Notas de implementación

Obtiene imagen de una categoria opcionalmente se puende recuperar indicando el tamaño

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3443/api/documents/category-image/[category_id=2623]/?width=[100]&height=[100]

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "image": "/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAAqAGQDASIAAhEBAxEB/8QAHAABAAIDAAMAAAAAAAAAAAAAAAUGAQMHAgQI/8QAKhAAAQQBAwMDBAMBAAAAAAAAAQACAwQRBQYSEyExIkFRBzJhgRQjkcH/xAAYAQEBAQEBAAAAAAAAAAAAAAAAAQMCBP/EACERAAMAAgEDBQAAAAAAAAAAAAABAgMREgQxYRMhQVHw/9oADAMBAAIRAxEAPwD6pREQBERAEREAREQBFpit15ZXRRTxPkb5a14JH6W5NaImn2CIiFCIiAjNySWoNEuWKEvTsQRPlb/WH8i1pIbj8nCpkeu7icNsNJledTrST2elUHKJwY0hoBIA7k+TldGRaxkUrTnZneN09p6KFe13c+n7Y0uxqFGOK86zEy25jQ9rY3SEH0gnHpwc5IGU3FuTVZNegpbckgfBNWyJnwOkY2XrNb3I9uLj2/avqLtZp3vivk5eOta5HMtQ3puFj6sMWkyR34p4YLdYxEtc5z3AmOTxxcACHe2e6uO09Rn1TT/5Np5ZPyc2as6ExmB+fs79zj58HyPhTiKXlmp0p0WMdS9uthQG69XhpVZKj3zRTTxHjIxnIN9vlT69bUaceoUpasxcGSN4kt8hZw0qTomebvG5h+5R69aqb2jw6PBMLcbmST2OJALSAST3/P8AxbaP1Ehm1CGnNQeJXTyQvEMzZHMxLIxno+5xPSLnADLQR5yrvUrtq1YYIySyJgYCfOAMLxbTrsuPtNhjFl7BG6UNHItBJAJ+Mk/6rkyc2Z9L0/oJ+frt+8nP6/1HeLd6OfTpntryv5FjeHThbJ0+TuRy52XMy0AY9XwrRsfcB3Lt2tqLoDXkeOMkZ7FrwBnt5aM+Ae+MH3U7wb39I7/hZa0NzxAGfhZnqMoiIAiIgCIiAIiIAiIgCIiAIiIAiIgP/9k="
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                    }
                                                
                                            

Notas de implementación

Obtiene imagen de un producto opcionalmente se puede recuperar por el tamaño indicado

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3030/api/documents/product-image/[product_id=7124]/?width=[100]&height=[100]&all=[1,0]

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "image": "/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCABEAGQDASIAAhEBAxEB/8QAHQAAAQUBAQEBAAAAAAAAAAAAAAMEBQYHAggBCf/EADwQAAECBAMGBAMFBgcAAAAAAAECAwAEBREGEiEHEzFBUWEiMnGhFBWBUnKCkbEII0LB0fAXMzVikqLh/8QAGQEAAwEBAQAAAAAAAAAAAAAAAAEDAgQF/8QAJxEAAgEDAwMDBQAAAAAAAAAAAAECAxEhEzFRBBJBFCKRI6GxweH/2gAMAwEAAhEDEQA/AMO+ZP1Jgio1F4NuWuhS9Ljy6c9YSTINtMlwT90qJSVfwntEXS2HnZ1LqsyMougBNySNRcco06hYQkK9h12kSpmZev5y8ovvfuwBc2yJJA53UbGOOdRJ2kytOl3L2opSZWSyL300lxV/DZQH14+0LYXw8cRVZ+Ql5lCFNNb3em5Ck6aaX6w6nMBVGiNh2uhUpLK0Q6BvQe4yn9TFk2NSjDWJJsszC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2eUB+kET75cmtOHBoLZXx3rf0ELIUq186YbobzcSgp6G4h20lDYA8o6gXiZUEOK+3eHKS5l4kiOElCh4XM3YAAwXI0C3PyhWNA600+mz7SXB0WgK/WIifwjQZ5B+IpMvr/EhGRX5psYlt7lPiUqOy8nS4UL9YFdbCaT3KY9s1w86vNknB2Ewf53hs9ssoKwd2uoNns6lQ90xeS+U8xl7RwZkjhc+sb1J8mdOHBn6tklNOqahOjsUpMc/4SU9Oqp+dUPupEaAqZy+ZRA9Y+fEpV5V3MPVnyLShwRVAw6qjy7bDM/NvS7Yslp3IUgf8b+8SymBfoYSVMKuRcH1EJF5wnQJt6xi7buzaSWEKKYBPm/SCG5cWTfLx6GCCwXHjZ4aCFEKzHhb0gggAUdaSUXIvrHW7DSQUqVa17E3gghDFGyFthRSm57R9SgE21t6wQQwB9lCUFQGveGV8xIIT9BBBAAkttOa0JFIQRbnBBAIQdJve50hJTrgT5jBBDEI5ydTBBBAB//Z"
                                                        },
                                                        "message": "Acción realizada con exíto, imagen resized"
                                                    }
                                                
                                            

Notas de implementación

Obtiene imagenes principales de los productos indicados y por tamaño si esta especificado

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3030/api/documents/main-products-images/?products_ids=7124,7125&width=100&height=100

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "images": [
                                                                {
                                                                    "product_id": "7124",
                                                                    "image": [
                                                                        "/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAA0AGQDASIAAhEBAxEB/8QAGwAAAgMBAQEAAAAAAAAAAAAAAAUGBwgDBAH/xAA5EAABAwMCBAQEAwUJAAAAAAABAgMEAAURBiESEzFBB1FhcRQigZEjMq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qFAEAgAkds4JG9X1FS23GaQzjlJSAnBztjasvtyw7JTHksuxZjiuFLboJStR7JV5n1+9PLLdZkCWpDVyfgyWvlDSs7eikHt9Kq23Sm9o1+Jxo0w+yWU/mjRFFVha/ExUZCf29FC2OnxkP5k+6k9R/W1Tu1ahtF1jJfgXCM82dtnACD5EHcGl5LDWBpRRRXTgUUUUAFFFFABRRRQApvNhgXTK5LRDwGziDwq/8Aajdv0pAdlqQ45IUhJ6cYGfsKKKsVyfS9mVy64O2OlsdX7TFquOmZdqejJTFW2f7vZST14grqDt1rMkC7yv3rTp24KTdLeHuS2Zo43Wh/C4MKHtnHpRRVZ7NSKUVhDDW0c2K9S7XEeeXGCQkF1QUoJPbIA2qLwGwu5XaSoq5kFlhtjCiAObxFZI7k4A36UUVEcay0Kkt6Os441rJjJUVLVxEk79frRRRUxT7n/9k="
                                                                    ]
                                                                },
                                                                {
                                                                    "product_id": "7125",
                                                                    "image": [
                                                                        "/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCABkAGQDASIAAhEBAxEB/8QAHAABAQADAQEBAQAAAAAAAAAAAAEEBQYDAgcI/8QAMRAAAgEEAQIEBAYBBQAAAAAAAQIAAwQFESExQQYSE1EUImFxBxUyQoGxwSNSYqHw/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAWEQEBAQAAAAAAAAAAAAAAAAAAARH/2gAMAwEAAhEDEQA/AP6piI3ARG43ARG43ARG43ARG43ARG43AREQBklMkCSxEBIeBvtLMPLEjHVwN7ZfKNddniBz+ay1Umo1KpqivCqnVj0nRYyk9HHWtKoAHSkqkAk6IHueZz+ExpvGFa40KVCrtAP3Muwd/Tc6mBYiQkKCSQAOpMC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                                    ]
                                                                }
                                                            ]
                                                        },
                                                        "message": [
                                                            "Acción realizada con exíto"
                                                        ]
                                                    }
                                                
                                            

Notas de implementación

Obtiene imagenes principales de las categorias indicadas y por tamaño si esta especificado

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3030/api/documents/main-categories-images/?width=100&height=100&categories_ids=2623,2464,2401

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "images": [
                                                                {
                                                                    "product_id": "7124",
                                                                    "image": [
                                                                        "/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCAA0AGQDASIAAhEBAxEB/8QAGwAAAgMBAQEAAAAAAAAAAAAAAAUGBwgDBAH/xAA5EAABAwMCBAQEAwUJAAAAAAABAgMEAAURBiESEzFBB1FhcRQigZEjMqEVFmKC8AgzRFJTcrHB4f/EABkBAAIDAQAAAAAAAAAAAAAAAAADAgQFAf/EACcRAAICAgEDAwQDAAAAAAAAAAABAgMRIQQSMUFRYfAUIiOBobHB/9oADAMBAAIRAxEAPwC31KuqW2luLaclpAPNH4hQpPfB+vbrUo/eaJFtqnrgpbakIBKXAApwdM8I6ZOag0/VdzjRZDDVqZaumySpSvlz3yPPHbNQtLtwlSFnU0d1EZX4aVIJQXTk4QkAjPU4PbvWf+SpOSZotQtaUtFtjUzT0E3GJzIsRJ4cLR+ZXmewT+p7V5Y/iJHjMuvXlj4eK2MmRxAbY2JSehPZIJON8YqCPPs2y1oQyyqPAYyorecDjgPkMghWOgz0rrY7VH1zIZukwSJFvaOWWnmeW0Vd1EHdf/FFdtkpaeSM6q4xy0XDYr7br7Bal2ySl5lxIUnKSk49iAaZ1FkoZgxs7JSkZz3p1YpKpdtbeXnKir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glriVBW5GJ6hB+U+6TsarvVPhhbLiparhZmi6esm3nkO+5T+VX2q/iAetcnI7bg+ZIqQGO53g0yJKvhNQpYa7NzIiw4n34dj70VrZyzx1qJ4R9qKAO10tMG6MKZnxmn0EYwtOah8vRc63JP7t3J5pgnPwjyyUfynqPpU9ooAgsKwS18UrUbjTcZhJUpKVlXEkDuT29Kc2PVNquSFoi8xhDSSQl1vl5SNsgdcbinkuO3Kiux3k8TTqChQ8wRg1G7FoqBaZUh8PSX1OoLY41Y4UkjOCnB7Cn1qrol156vBVufIVsFUl0+cj+PLiT0KDDrTwH5gN8e9ZF8WvCHUWjbo9fNISHHYbrqlFKSA42VEnh8lJ9DWtP2RE4QMPe/PXk++9crxaUS7E9AZyMpy2VqKsKByMk70lYb9h0nNQbW2YBueoLzfDEtV3ty1TY6sMpQ3yyrJ3BT03J3UPKr38OdOytOaeS1PVxSpK+esAYSnIAwn0AApvItqkX8/EW9pHJz+IpPzJVj+vpXonia4yVMOpS43ngQd+MDoCe1XI1Srw12MXkcn6jFc2o5891+8Jv5s+MSQbmApxUd1lzDTqFAEAgAkds4JG9X1FS23GaQzjlJSAnBztjasvtyw7JTHksuxZjiuFLboJStR7JV5n1+9PLLdZkCWpDVyfgyWvlDSs7eikHt9Kq23Sm9o1+Jxo0w+yWU/mjRFFVha/ExUZCf29FC2OnxkP5k+6k9R/W1Tu1ahtF1jJfgXCM82dtnACD5EHcGl5LDWBpRRRXTgUUUUAFFFFABRRRQApvNhgXTK5LRDwGziDwq/8Aajdv0pAdlqQ45IUhJ6cYGfsKKKsVyfS9mVy64O2OlsdX7TFquOmZdqejJTFW2f7vZST14grqDt1rMkC7yv3rTp24KTdLeHuS2Zo43Wh/C4MKHtnHpRRVZ7NSKUVhDDW0c2K9S7XEeeXGCQkF1QUoJPbIA2qLwGwu5XaSoq5kFlhtjCiAObxFZI7k4A36UUVEcay0Kkt6Os441rJjJUVLVxEk79frRRRUxT7n/9k="
                                                                    ]
                                                                },
                                                                {
                                                                    "product_id": "7125",
                                                                    "image": [
                                                                        "/9j/2wBDAAYEBQYFBAYGBQYHBwYIChAKCgkJChQODwwQFxQYGBcUFhYaHSUfGhsjHBYWICwgIyYnKSopGR8tMC0oMCUoKSj/2wBDAQcHBwoIChMKChMoGhYaKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCgoKCj/wAARCABkAGQDASIAAhEBAxEB/8QAHAABAQADAQEBAQAAAAAAAAAAAAEEBQYDAgcI/8QAMRAAAgEEAQIEBAYBBQAAAAAAAQIAAwQFESExQQYSE1EUImFxBxUyQoGxwSNSYqHw/8QAFQEBAQAAAAAAAAAAAAAAAAAAAAH/xAAWEQEBAQAAAAAAAAAAAAAAAAAAARH/2gAMAwEAAhEDEQA/AP6piI3ARG43ARG43ARG43ARG43ARG43AREQBklMkCSxEBIeBvtLMPLEjHVwN7ZfKNddniBz+ay1Umo1KpqivCqnVj0nRYyk9HHWtKoAHSkqkAk6IHueZz+ExpvGFa40KVCrtAP3Muwd/Tc6mBYiQkKCSQAOpMCxOfyWdaizGiqCivV2PWbXF1K1XH0KlyR6rr5m+Ty63yBrZ7agZkREAZJTJAQYkgJrbpjd3i26n/TQ7Y/X/wB/cyr64+Hty37zwu/eeWKpBLf1N7Z+d73xAzQAqgKNAdhEsQE0via48lmaS9/mY+bWgD/mbC9uhbrpfmqt+lf8mfFlald1a/zVW557QNPjMI9Spb3F8qqqbYUfc74Lfb2nSyRA+oiIAySnpJATCyXw60TWvbg0KFPq3q+mv8mZjew7zlb8/nXi22sV02Pxq/E1zrYetvSLyNbXRPB4ko3wsbOkpqeip42S5Lf3NVi1uUzRe28gsKyk1aR48jD9LL9+hH8zPy1f5Fog8ty32nvjqXpW4JHzvz9h2iDIrs60yaKB6nZS3l/7mKbm8AO7E71wRVUjf9zV5PJ3NzlvyfDN5K6BXuro0/Mtup5A0eCzDevbro9txdXAtqI2SzdF31JjRhY3y1L2qLjzfFKA3lYdvcTbTQ2djVuMtb5A1WX0g6OO1QMB8v8ABAM38oREQLERAGSUzxujVFBjQVWqDorcA/SB9jZBPQnp9JpcDiaeEs6yPW9e5rVWuLm5KhWqsT1IHTjQ0OJ+bfiV+JXi7wvdUlxfhhMjaVRoV6fndkfurIBsfQ9DMnwB47y/ibD138R4uria6OFZKtI01dTyGUtr7ESYO8oE3l/yNhvmP0UTOzq5A4yqmI9EXbkIHqkgICdFhrqQOQNjpOWyGdv8DhGyFOxqXwI9T4ezVXqMu9cbI2QNHW+nSc7gfxy8OZjNW+H1dUMjcP6aUbi2ekWb22djfBij9Cw+OtsBjDSRzUYnz1q7AB61TQBY67nUlFKl9c+Z+F7/APEe33nk1R8hcIKY0n7B7D3M3lvRWhSCJ26n3PvEH2iKiBVACjgCWWJQiSWBYiIAyaliB4VlRQziiHfXZRszXpSq3VdvibKmtIDgMinmbeIGItqgUp6SBP8AaEGprMhgKFy6uC1OoD8rpSQlfsSJvogazE4x7BCPiqlbfd0UH7cCbLRliBNRoyxAmjGpYgIiICIiAiIgIiICIiAiIgIiICIiB//Z"
                                                                    ]
                                                                }
                                                            ]
                                                        },
                                                        "message": [
                                                            "Acción realizada con exíto"
                                                        ]
                                                    }
                                                
                                            

Notas de implementación

Devulve todos los archivos(imagenes) de categorias por parent_id

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3030/api/categories/categories-files-by-parent/11

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "files": [
                                                                {
                                                                    "id": "2400",
                                                                    "url": "http://equipo-mt.com/erp_pruebas/documents/categorie/0/0/2400/photos/descarga.jpeg",
                                                                    "uri": "/documents/categorie/0/0/2400/photos/descarga.jpeg",
                                                                    "name": "",
                                                                    "path": "/home1/equipomt/public_html/erp_pruebas/documents/categorie/0/0/2400/photos",
                                                                    "level1name": "",
                                                                    "relativename": "descarga.jpeg",
                                                                    "fullname": "/home1/equipomt/public_html/erp_pruebas/documents/categorie/0/0/2400/photos/descarga.jpeg",
                                                                    "date": 1601015618,
                                                                    "size": 309430,
                                                                    "type": "file"
                                                                },
                                                                {
                                                                    "id": "2406",
                                                                    "url": "http://equipo-mt.com/erp_pruebas/documents/categorie/6/0/2406/photos/anti-waifu-0-1591052612.png",
                                                                    "uri": "/documents/categorie/6/0/2406/photos/anti-waifu-0-1591052612.png",
                                                                    "name": "",
                                                                    "path": "/home1/equipomt/public_html/erp_pruebas/documents/categorie/6/0/2406/photos",
                                                                    "level1name": "",
                                                                    "relativename": "anti-waifu-0-1591052612.png",
                                                                    "fullname": "/home1/equipomt/public_html/erp_pruebas/documents/categorie/6/0/2406/photos/anti-waifu-0-1591052612.png",
                                                                    "date": 1601063137,
                                                                    "size": 232590,
                                                                    "type": "file"
                                                                }
                                                            ]
                                                        }
                                                    }
                                                
                                            

Notas de implementación

Devuelve todos las categorias por parametros de API DOLIBARR

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3030/api/categories/[...]

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "categories": [
                                                                {
                                                                    "fk_parent": "2596",
                                                                    "label": "SILVER",
                                                                    "description": "",
                                                                    "color": "",
                                                                    "type": "0",
                                                                    "id": "2597",
                                                                    "import_key": null,
                                                                    "array_options": [],
                                                                    "linkedObjectsIds": null,
                                                                    "origin": null,
                                                                    "origin_id": null,
                                                                    "ref": null,
                                                                    "ref_ext": null,
                                                                    "state": null,
                                                                    "state_id": null,
                                                                    "state_code": null,
                                                                    "region": null,
                                                                    "region_code": null,
                                                                    "modelpdf": null,
                                                                    "last_main_doc": null,
                                                                    "note_public": null,
                                                                    "note_private": null,
                                                                    "comments": [],
                                                                    "date_creation": null,
                                                                    "date_validation": null,
                                                                    "date_modification": null,
                                                                    "visible": "0",
                                                                    "entity": "1"
                                                                },
                                                                {
                                                                    "fk_parent": "2596",
                                                                    "label": "BRONZE",
                                                                    "description": "",
                                                                    "color": "",
                                                                    "type": "0",
                                                                    "id": "2598",
                                                                    "import_key": null,
                                                                    "array_options": [],
                                                                    "linkedObjectsIds": null,
                                                                    "origin": null,
                                                                    "origin_id": null,
                                                                    "ref": null,
                                                                    "ref_ext": null,
                                                                    "state": null,
                                                                    "state_id": null,
                                                                    "state_code": null,
                                                                    "region": null,
                                                                    "region_code": null,
                                                                    "modelpdf": null,
                                                                    "last_main_doc": null,
                                                                    "note_public": null,
                                                                    "note_private": null,
                                                                    "comments": [],
                                                                    "date_creation": null,
                                                                    "date_validation": null,
                                                                    "date_modification": null,
                                                                    "visible": "0",
                                                                    "entity": "1"
                                                                }
                                                            ]
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                    }
                                                
                                            

Notas de implementación

Recupera categorias que son parametros para hacer movimientos de precios

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3030/api/categories/pricing-categories/?page=[0]&limit=[5]&with_images=[1]&image_width=[200]&image_height=[200]&only_with_products_salable=[1]

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "pricing_categories": [
                                                                {
                                                                    "fk_parent": "2596",
                                                                    "label": "SILVER",
                                                                    "description": "",
                                                                    "color": "",
                                                                    "type": "0",
                                                                    "id": "2597",
                                                                    "import_key": null,
                                                                    "array_options": [],
                                                                    "linkedObjectsIds": null,
                                                                    "origin": null,
                                                                    "origin_id": null,
                                                                    "ref": null,
                                                                    "ref_ext": null,
                                                                    "state": null,
                                                                    "state_id": null,
                                                                    "state_code": null,
                                                                    "region": null,
                                                                    "region_code": null,
                                                                    "modelpdf": null,
                                                                    "last_main_doc": null,
                                                                    "note_public": null,
                                                                    "note_private": null,
                                                                    "comments": [],
                                                                    "date_creation": null,
                                                                    "date_validation": null,
                                                                    "date_modification": null,
                                                                    "visible": "0",
                                                                    "entity": "1",
                                                                    "image_url": [
                                                                    "http://localhost:3030/public/categories/2400/thumbs/adaptador__200x200.jpg"
                                                                    ]
                                                                },
                                                                {
                                                                    "fk_parent": "2596",
                                                                    "label": "BRONZE",
                                                                    "description": "",
                                                                    "color": "",
                                                                    "type": "0",
                                                                    "id": "2598",
                                                                    "import_key": null,
                                                                    "array_options": [],
                                                                    "linkedObjectsIds": null,
                                                                    "origin": null,
                                                                    "origin_id": null,
                                                                    "ref": null,
                                                                    "ref_ext": null,
                                                                    "state": null,
                                                                    "state_id": null,
                                                                    "state_code": null,
                                                                    "region": null,
                                                                    "region_code": null,
                                                                    "modelpdf": null,
                                                                    "last_main_doc": null,
                                                                    "note_public": null,
                                                                    "note_private": null,
                                                                    "comments": [],
                                                                    "date_creation": null,
                                                                    "date_validation": null,
                                                                    "date_modification": null,
                                                                    "visible": "0",
                                                                    "entity": "1",
                                                                    "image_url": [
                                                                    "http://localhost:3030/public/categories/2400/thumbs/adaptador__200x200.jpg"
                                                                    ]
                                                                }
                                                            ]
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                    }
                                                
                                            

Notas de implementación

Recupera lista de categorias marcas a partir de una categoria de tipo de producto

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3030/api/categories/marks-categories-by-type-category/[type_category_id=2407]/?only_with_products_salable=[1]

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "marks_categories": [
                                                                {
                                                                    "fk_parent": "10",
                                                                    "label": "CORSAIR",
                                                                    "description": null,
                                                                    "color": null,
                                                                    "type": "0",
                                                                    "id": "2477",
                                                                    "import_key": null,
                                                                    "array_options": [],
                                                                    "linkedObjectsIds": null,
                                                                    "origin": null,
                                                                    "origin_id": null,
                                                                    "ref": null,
                                                                    "ref_ext": null,
                                                                    "state": null,
                                                                    "state_id": null,
                                                                    "state_code": null,
                                                                    "region": null,
                                                                    "region_code": null,
                                                                    "modelpdf": null,
                                                                    "last_main_doc": null,
                                                                    "note_public": null,
                                                                    "note_private": null,
                                                                    "comments": [],
                                                                    "date_creation": null,
                                                                    "date_validation": null,
                                                                    "date_modification": null,
                                                                    "visible": "1",
                                                                    "entity": "1"
                                                                },
                                                                {
                                                                    "fk_parent": "10",
                                                                    "label": "EVGA",
                                                                    "description": null,
                                                                    "color": null,
                                                                    "type": "0",
                                                                    "id": "2483",
                                                                    "import_key": null,
                                                                    "array_options": [],
                                                                    "linkedObjectsIds": null,
                                                                    "origin": null,
                                                                    "origin_id": null,
                                                                    "ref": null,
                                                                    "ref_ext": null,
                                                                    "state": null,
                                                                    "state_id": null,
                                                                    "state_code": null,
                                                                    "region": null,
                                                                    "region_code": null,
                                                                    "modelpdf": null,
                                                                    "last_main_doc": null,
                                                                    "note_public": null,
                                                                    "note_private": null,
                                                                    "comments": [],
                                                                    "date_creation": null,
                                                                    "date_validation": null,
                                                                    "date_modification": null,
                                                                    "visible": "1",
                                                                    "entity": "1"
                                                                },
                                                                ......
                                                            ]
                                                        }
                                                    }
                                                
                                            

Notas de implementación

Recupera lista de categorias de tipos de productos

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3030/api/categories/types-categories/?page=[0]&limit=[5]&with_images=[1]&image_width=[200]&image_height=[200]&only_with_products_salable=[1]

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "types_categories": [
                                                                {
                                                                    "fk_parent": "11",
                                                                    "label": "ADAPTADOR RED",
                                                                    "description": null,
                                                                    "color": null,
                                                                    "type": "0",
                                                                    "id": "2400",
                                                                    "import_key": null,
                                                                    "array_options": [],
                                                                    "linkedObjectsIds": null,
                                                                    "origin": null,
                                                                    "origin_id": null,
                                                                    "ref": null,
                                                                    "ref_ext": null,
                                                                    "state": null,
                                                                    "state_id": null,
                                                                    "state_code": null,
                                                                    "region": null,
                                                                    "region_code": null,
                                                                    "modelpdf": null,
                                                                    "last_main_doc": null,
                                                                    "note_public": null,
                                                                    "note_private": null,
                                                                    "comments": [],
                                                                    "date_creation": null,
                                                                    "date_validation": null,
                                                                    "date_modification": null,
                                                                    "visible": "1",
                                                                    "entity": "1",
                                                                    "image_url": [
                                                                        "http://localhost:3030/public/categories/2400/thumbs/adaptador__200x200.jpg"
                                                                    ]
                                                                },
                                                                {
                                                                    "fk_parent": "11",
                                                                    "label": "AUDIFONO",
                                                                    "description": null,
                                                                    "color": null,
                                                                    "type": "0",
                                                                    "id": "2401",
                                                                    "import_key": null,
                                                                    "array_options": [],
                                                                    "linkedObjectsIds": null,
                                                                    "origin": null,
                                                                    "origin_id": null,
                                                                    "ref": null,
                                                                    "ref_ext": null,
                                                                    "state": null,
                                                                    "state_id": null,
                                                                    "state_code": null,
                                                                    "region": null,
                                                                    "region_code": null,
                                                                    "modelpdf": null,
                                                                    "last_main_doc": null,
                                                                    "note_public": null,
                                                                    "note_private": null,
                                                                    "comments": [],
                                                                    "date_creation": null,
                                                                    "date_validation": null,
                                                                    "date_modification": null,
                                                                    "visible": "1",
                                                                    "entity": "1",
                                                                    "image_url": [
                                                                        "http://localhost:3030/public/categories/2400/thumbs/adaptador__200x200.jpg"
                                                                        ]
                                                                }]
                                                            }
                                                        }
                                                
                                            

Notas de implementación

Recupera lista de categorias de marcas

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3030/api/categories/marks-categories/?page=[0]&limit=[5]&with_images=[1]&image_width=[200]&image_height=[200]&only_with_products_salable=[1]

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "marks_categories": [
                                                                {
                                                                    "fk_parent": "10",
                                                                    "label": "ACER",
                                                                    "description": null,
                                                                    "color": null,
                                                                    "type": "0",
                                                                    "id": "2463",
                                                                    "import_key": null,
                                                                    "array_options": [],
                                                                    "linkedObjectsIds": null,
                                                                    "origin": null,
                                                                    "origin_id": null,
                                                                    "ref": null,
                                                                    "ref_ext": null,
                                                                    "state": null,
                                                                    "state_id": null,
                                                                    "state_code": null,
                                                                    "region": null,
                                                                    "region_code": null,
                                                                    "modelpdf": null,
                                                                    "last_main_doc": null,
                                                                    "note_public": null,
                                                                    "note_private": null,
                                                                    "comments": [],
                                                                    "date_creation": null,
                                                                    "date_validation": null,
                                                                    "date_modification": null,
                                                                    "visible": "1",
                                                                    "entity": "1",
                                                                    "image_url": [
                                                                        "http://localhost:3030/public/categories/2400/thumbs/adaptador__200x200.jpg"
                                                                        ]
                                                                },
                                                                {
                                                                    "fk_parent": "10",
                                                                    "label": "ADATA",
                                                                    "description": null,
                                                                    "color": null,
                                                                    "type": "0",
                                                                    "id": "2464",
                                                                    "import_key": null,
                                                                    "array_options": [],
                                                                    "linkedObjectsIds": null,
                                                                    "origin": null,
                                                                    "origin_id": null,
                                                                    "ref": null,
                                                                    "ref_ext": null,
                                                                    "state": null,
                                                                    "state_id": null,
                                                                    "state_code": null,
                                                                    "region": null,
                                                                    "region_code": null,
                                                                    "modelpdf": null,
                                                                    "last_main_doc": null,
                                                                    "note_public": null,
                                                                    "note_private": null,
                                                                    "comments": [],
                                                                    "date_creation": null,
                                                                    "date_validation": null,
                                                                    "date_modification": null,
                                                                    "visible": "1",
                                                                    "entity": "1",
                                                                    "image_url": [
                                                                        "http://localhost:3030/public/categories/2400/thumbs/adaptador__200x200.jpg"
                                                                        ]
                                                                }
                                                            ]
                                                        }
                                                    }
                                                
                                            

Notas de implementación

Recupera lista de categorias de promociones

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3443/api/categories/promotions-categories/?page=[0]&limit=[5]&with_images=[1]&image_width=[200]&image_height=[200]&only_with_products_salable=[1]

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "promotions_categories": [
                                                                {
                                                                    "fk_parent": "10",
                                                                    "label": "ACER",
                                                                    "description": null,
                                                                    "color": null,
                                                                    "type": "0",
                                                                    "id": "2463",
                                                                    "import_key": null,
                                                                    "array_options": [],
                                                                    "linkedObjectsIds": null,
                                                                    "origin": null,
                                                                    "origin_id": null,
                                                                    "ref": null,
                                                                    "ref_ext": null,
                                                                    "state": null,
                                                                    "state_id": null,
                                                                    "state_code": null,
                                                                    "region": null,
                                                                    "region_code": null,
                                                                    "modelpdf": null,
                                                                    "last_main_doc": null,
                                                                    "note_public": null,
                                                                    "note_private": null,
                                                                    "comments": [],
                                                                    "date_creation": null,
                                                                    "date_validation": null,
                                                                    "date_modification": null,
                                                                    "visible": "1",
                                                                    "entity": "1",
                                                                    "image_url": [
                                                                        "http://localhost:3030/public/categories/2400/thumbs/adaptador__200x200.jpg"
                                                                        ]
                                                                },
                                                                {
                                                                    "fk_parent": "10",
                                                                    "label": "ADATA",
                                                                    "description": null,
                                                                    "color": null,
                                                                    "type": "0",
                                                                    "id": "2464",
                                                                    "import_key": null,
                                                                    "array_options": [],
                                                                    "linkedObjectsIds": null,
                                                                    "origin": null,
                                                                    "origin_id": null,
                                                                    "ref": null,
                                                                    "ref_ext": null,
                                                                    "state": null,
                                                                    "state_id": null,
                                                                    "state_code": null,
                                                                    "region": null,
                                                                    "region_code": null,
                                                                    "modelpdf": null,
                                                                    "last_main_doc": null,
                                                                    "note_public": null,
                                                                    "note_private": null,
                                                                    "comments": [],
                                                                    "date_creation": null,
                                                                    "date_validation": null,
                                                                    "date_modification": null,
                                                                    "visible": "1",
                                                                    "entity": "1",
                                                                    "image_url": [
                                                                        "http://localhost:3030/public/categories/2400/thumbs/adaptador__200x200.jpg"
                                                                        ]
                                                                }
                                                            ]
                                                        }
                                                    }
                                                
                                            

Notas de implementación

Obtiene el STOCK VIRTUAL de un producto

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3030/api/prices/virtual-stock/[product_id=7124]/

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "virtual_stock": 45
                                                        },
                                                        "message": "Acción completada"
                                                    }
                                                
                                            

Notas de implementación

Cambia el PORCENTAJE para calcular el precio de venta

Response Json (Status 200)

Success

Url Request (POST)

http://tiendasclick.com:3030/api/prices/change-percentage-to-price-category/

Body POST

                                                {
                                                    "price_list_id":"1",
                                                    "price_category_id":"2599",
                                                    "price_percentage":"11",
                                                    "other_categories_ids":"2407,2514"
                                                    "product_id_dolibarr": [9333, 9332, 9328]   #si esta definido, se ha aplicar a todos estos productos
                                                }
                                            
                                                {
                                                    "price_list_id":"1",
                                                    "price_category_id":"2599",     #se aplica a todos los productos de esta categoria
                                                    "price_percentage":"12",
                                                    "other_categories_ids":null
                                                    "product_id_dolibarr": null     #no aplica
                                                }
                                            

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "products_updates": [
                                                                {
                                                                    "id_sale_price": 2241,
                                                                    "product_id": "7124",
                                                                    "price_list_id": "1",
                                                                    "category_id": "2597",
                                                                    "original_price": "4.90",
                                                                    "percentage_of_purchase_price": "5",
                                                                    "status": 1,
                                                                    "sale_price": "5.15",
                                                                    "updatedAt": "2021-04-09T15:50:47.951Z",
                                                                    "createdAt": "2021-04-09T15:50:47.951Z"
                                                                },
                                                                {
                                                                    "id_sale_price": 2242,
                                                                    "product_id": "7126",
                                                                    "price_list_id": "1",
                                                                    "category_id": "2597",
                                                                    "original_price": "10.90",
                                                                    "percentage_of_purchase_price": "5",
                                                                    "status": 1,
                                                                    "sale_price": "11.45",
                                                                    "updatedAt": "2021-04-09T15:50:47.964Z",
                                                                    "createdAt": "2021-04-09T15:50:47.964Z"
                                                                }
                                                            ]
                                                        }
                                                    }
                                                
                                            

Notas de implementación

Obtiene detalle de un Producto

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3030/api/prices/product_to_store/[7221]/?image_width=[300]&image_height=[200]

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "product": {
                                                                "id": "8980",
                                                                "product_id": "8980",
                                                                "label": "TECLADO T-DAGGER T-TGK315W-BL Bora white wired blue switch Spanish LA",
                                                                "description": "GARANTIA: 1 AÑO",
                                                                "ref": "ID_0001848",
                                                                "price_list_id": "1",
                                                                "image_url": [
                                                                    "https://www.equipo-mt.com:3443/documents/products/8980/thumbs/ID_0001848-teclado-gamer-mecanico-t-dagger-bora-switch-blue-rgb-black-t-tgk315_88701__400x200.png",
                                                                    "https://www.equipo-mt.com:3443/documents/products/8980/thumbs/ID_0001848-WhatsApp%20Image%202021-12-06%20at%2017.02.29%20(1)__400x200.png"
                                                                ],
                                                                "original_price": "295.80",
                                                                "prices": [
                                                                    {
                                                                        "code": "USD",
                                                                        "original_price": "42.50",
                                                                        "sale_price": "42.50",
                                                                        "sale_price_iva": "48.02",
                                                                        "rate": "1.00",
                                                                        "active": 1,
                                                                        "default": 1
                                                                    },
                                                                    {
                                                                        "code": "BOB",
                                                                        "original_price": "295.80",
                                                                        "sale_price": "295.80",
                                                                        "sale_price_iva": "334.25",
                                                                        "rate": "6.96",
                                                                        "active": 1,
                                                                        "default": 0
                                                                    }
                                                                ],
                                                                "sale_price": "295.80",
                                                                "virtual_stock": 25,
                                                                "physical_stock": 25
                                                            }
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                    }
                                                
                                            

Notas de implementación

Guarda ID de la lista de precios SELECCIONADO en el entorno de tiendas

Response Json (Status 200)

Success

Url Request (POST)

http://tiendasclick.com:3030/api/prices/current-price-list/1/

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "current_price_list": {
                                                                "id": 10,
                                                                "key": "CURRENT_PRICE_LIST_ID",
                                                                "value": "1",
                                                                "updatedAt": "2021-02-04T09:59:45.290Z",
                                                                "createdAt": "2021-02-04T09:59:45.290Z"
                                                            }
                                                        },
                                                        "message": "Acción completada"
                                                    }
                                                
                                            

Notas de implementación

Recupera el ID de la lista de precios ACTUAL

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3030/api/prices/current_price_list_id/

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "current_price_list": {
                                                                "id": 10,
                                                                "key": "CURRENT_PRICE_LIST_ID",
                                                                "value": "1",
                                                                "updatedAt": "2021-02-04T09:59:45.290Z",
                                                                "createdAt": "2021-02-04T09:59:45.290Z"
                                                            }
                                                        },
                                                        "message": "Acción completada"
                                                    }
                                                
                                            

Notas de implementación

Cambia Categoria, ese cambio se refleja hasta el ERP (Dolibarr) y para todas las LISTAS DE PRECIOS, reseteando cualquier PRECIO DE VENTA APLICADO

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3030/api/prices/change_price_category/[product_id=7123]/[new_price_category_id=2600]

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "resultCategories": {
                                                                "success": {
                                                                    "code": 200,
                                                                    "message": "Was put Product to Category"
                                                                }
                                                            }
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                    }
                                                
                                            

Notas de implementación

Guarda uno o varios precios de venta de productos el parametro [price_list_id] si corresponde, no es incluyente es escluyente para el resultado lo quiere decir es, si hay PRECIOS DE VENTA para la LISTA_ID enviado por parametro lo ASOCIARA los datos correspondientes, sino hay PRECIOS DE VENTA para PRODUCTO Y LISTA DE PRECIO simplemente no sera asociado

Response Json (Status 200)

Success

Url Request para la TIENDA (GET)

http://localhost:3030/api/prices/store_products/?type_category_id=[2407]&mark_category_id=[2514]&page=[0]&limit=[2]&image_width=300&image_height=200

Url Request para el ERP (GET)

http://localhost:3030/api/prices/erp_products/?type_category_id=[2407]&mark_category_id=[2514]&price_list_id=[1]&page=[0]&limit=[2] (GET)

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "products": [
                                                                {
                                                                    "id": "9124",
                                                                    "product_id": "9124",
                                                                    "label": "TARJETA DE VIDEO ASROCK PG D RADEON RX570 8G OC/H ASRock Phantom Gaming D Radeon RX570 8G OC 8 GB GDDR5 - DVI/HDMI/TRI DISPLAYPORT - PCI EXPRESS (AMD RADEON RX 570)",
                                                                    "ref": "ID_0001992",
                                                                    "price_list_id": "1",
                                                                    "image_url": [],
                                                                    "original_price": "2053.20",
                                                                    "sale_price": "256.65",
                                                                    "prices": [
                                                                        {
                                                                            "code": "USD",
                                                                            "original_price": "295.00",
                                                                            "sale_price": "256.65",
                                                                            "sale_price_iva": "295.00",
                                                                            "rate": "1.00",
                                                                            "active": 1,
                                                                            "default": 1
                                                                        },
                                                                        {
                                                                            "code": "BOB",
                                                                            "original_price": "2053.20",
                                                                            "sale_price": "1786.28",
                                                                            "sale_price_iva": "2053.20",
                                                                            "rate": "6.96",
                                                                            "active": 1,
                                                                            "default": 0
                                                                        }
                                                                    ],
                                                                    "net_cost": "256.65",
                                                                    "invoiced_price": "295.00",
                                                                    "virtual_stock": 7,
                                                                    "physical_stock": 7,
                                                                    "categories_ids": [
                                                                        "2451",
                                                                        "2467",
                                                                        "2599"
                                                                    ],
                                                                    "utility": 0,
                                                                    "iva": "38.35",
                                                                    "iva_df": "38.35"
                                                                }
                                                            ]
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                    }                            
                                                
                                            

Notas de implementación

Guarda uno o varios precios de venta de productos

Response Json (Status 200)

Success

Url Request (POST)

http://tiendasclick.com:3030/api/prices/sales-prices/

Body POST

                                                { 
                                                    "sales_prices":[
                                                        {
                                                            "purchase_price_id":null,        
                                                            "product_id":"7220",        
                                                            "category_id":"2599",
                                                            "price_list_id":"1",
                                                            "original_price": 69.5,        
                                                            "percentage_of_purchase_price":"1"             
                                                        },
                                                        {
                                                            "purchase_price_id":null,        
                                                            "product_id":"7222",
                                                            "category_id":"2599",
                                                            "price_list_id":"1",    
                                                            "original_price": "67.9",
                                                            "percentage_of_purchase_price": "5"            
                                                        }
                                                    ]
                                                }
                                            

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "sales_prices": [
                                                                {
                                                                    "created_at": "2021-01-27T20:18:03.223Z",
                                                                    "updated_at": "2021-01-27T20:18:03.223Z",
                                                                    "id": 67,
                                                                    "purchase_price_id": null,
                                                                    "product_id": "7220",
                                                                    "category_id": "2599",
                                                                    "price_list_id": "1",
                                                                    "percentage_of_purchase_price": "1",
                                                                    "status": 1,
                                                                    "original_price": "69.5",
                                                                    "sale_price": "70.19",
                                                                    "updatedAt": "2021-01-27T20:18:03.223Z",
                                                                    "createdAt": "2021-01-27T20:18:03.223Z"
                                                                },
                                                                {
                                                                    "created_at": "2021-01-27T20:18:04.093Z",
                                                                    "updated_at": "2021-01-27T20:18:04.093Z",
                                                                    "id": 68,
                                                                    "purchase_price_id": null,
                                                                    "product_id": "7222",
                                                                    "category_id": "2599",
                                                                    "price_list_id": "1",
                                                                    "percentage_of_purchase_price": "5",
                                                                    "status": 1,
                                                                    "original_price": "67.9",
                                                                    "sale_price": "71.30",
                                                                    "updatedAt": "2021-01-27T20:18:04.093Z",
                                                                    "createdAt": "2021-01-27T20:18:04.093Z"
                                                                }
                                                            ]
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                    }
                                                
                                            

Notas de implementación

Recupera un precio de venta

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3030/api/prices/store-sale-price/[product_id]

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "prices": {
                                                                "id": 2,
                                                                "product_id": 2,
                                                                "price_list_id": 1,
                                                                "purchase_price_id": null,
                                                                "category_id": null,
                                                                "original_price": 40,
                                                                "percentage_of_purchase_price": 10,
                                                                "sale_price": 44,
                                                                "status": "1",
                                                                "created_at": "2021-01-18T15:18:12.000Z",
                                                                "updated_at": "2021-01-18T15:18:12.000Z",
                                                                "createdAt": "2021-01-18T15:18:12.000Z",
                                                                "updatedAt": "2021-01-18T15:18:12.000Z"
                                                            }
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                    }
                                                
                                            

Notas de implementación

Recupera un precio de venta

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3030/api/prices/erp-sale-price/[price_list_id]/[product_id]

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "prices": {
                                                                "id": 2,
                                                                "product_id": 2,
                                                                "price_list_id": 1,
                                                                "purchase_price_id": null,
                                                                "category_id": null,
                                                                "original_price": 40,
                                                                "percentage_of_purchase_price": 10,
                                                                "sale_price": 44,
                                                                "status": "1",
                                                                "created_at": "2021-01-18T15:18:12.000Z",
                                                                "updated_at": "2021-01-18T15:18:12.000Z",
                                                                "createdAt": "2021-01-18T15:18:12.000Z",
                                                                "updatedAt": "2021-01-18T15:18:12.000Z"
                                                            }
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                    }
                                                
                                            

Notas de implementación

Recupera un lista de precios de venta por lista de precios

Response Json (Status 200)

Success

Url Request (GET)

http://tiendasclick.com:3030/api/prices/sales-prices/[price_list_id]

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "sales_prices": [
                                                                {
                                                                    "id": 5,
                                                                    "product_id": 7220,
                                                                    "price_list_id": 1,
                                                                    "purchase_price_id": null,
                                                                    "category_id": 2599,
                                                                    "original_price": 69.5,
                                                                    "percentage_of_purchase_price": 1,
                                                                    "sale_price": 70.19,
                                                                    "status": "1",
                                                                    "createdAt": "2021-02-04T05:03:59.000Z",
                                                                    "updatedAt": "2021-02-04T05:03:59.000Z"
                                                                },
                                                                {
                                                                    "id": 6,
                                                                    "product_id": 7222,
                                                                    "price_list_id": 1,
                                                                    "purchase_price_id": null,
                                                                    "category_id": 2599,
                                                                    "original_price": 67.9,
                                                                    "percentage_of_purchase_price": 5,
                                                                    "sale_price": 67.93,
                                                                    "status": "1",
                                                                    "createdAt": "2021-02-04T05:03:59.000Z",
                                                                    "updatedAt": "2021-02-04T05:03:59.000Z"
                                                                }
                                                            ]
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                    }
                                                
                                            

Notas de implementación

Guarda un lista de precio

Response Json (Status 200)

Success

Url Request (POST)

http://localhost:3030/api/prices/prices-lists/

Body POST

                                                
                                                    {
                                                        "price_list":{
                                                            "name":"nueva lista cinco"
                                                        }
                                                    }
                                                
                                            

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "price_list": {
                                                                "created_at": "2021-01-17T06:59:20.210Z",
                                                                "updated_at": "2021-01-17T06:59:20.210Z",
                                                                "id": 2,
                                                                "name": "nueva lista cinco",
                                                                "updatedAt": "2021-01-17T06:59:20.210Z",
                                                                "createdAt": "2021-01-17T06:59:20.210Z"
                                                            }
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                    }
                                                
                                            

Notas de implementación

Recupera un lista de precio

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/prices/prices-lists/[price_list_id]

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "price_list": {
                                                                "id": 1,
                                                                "name": "nueva lista cinco",
                                                                "description": null,
                                                                "status": null,
                                                                "created_at": "2021-01-18T15:28:30.000Z",
                                                                "updated_at": "2021-01-18T15:28:30.000Z",
                                                                "createdAt": "2021-01-18T15:28:30.000Z",
                                                                "updatedAt": "2021-01-18T15:28:30.000Z"
                                                            }
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                    }
                                                
                                            

Notas de implementación

Recupera varias listas de precios

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/prices/prices-lists/

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "prices_lists": [
                                                                {
                                                                    "id": 1,
                                                                    "name": "nueva lista cinco",
                                                                    "description": null,
                                                                    "status": "1",
                                                                    "created_at": "2021-01-19T14:35:11.000Z",
                                                                    "updated_at": "2021-01-19T14:35:11.000Z",
                                                                    "createdAt": "2021-01-19T14:35:11.000Z",
                                                                    "updatedAt": "2021-01-19T14:35:11.000Z"
                                                                },
                                                                {
                                                                    "id": 2,
                                                                    "name": "nueva lista seis",
                                                                    "description": null,
                                                                    "status": "1",
                                                                    "created_at": "2021-01-19T15:22:26.000Z",
                                                                    "updated_at": "2021-01-19T15:22:26.000Z",
                                                                    "createdAt": "2021-01-19T15:22:26.000Z",
                                                                    "updatedAt": "2021-01-19T15:22:26.000Z"
                                                                }
                                                            ]
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                    }
                                                
                                            

Notas de implementación

Obtiene la lista de usuarios

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/users

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                          "usuario": [
                                                            {
                                                              "ID": 1,
                                                              "USERNAME": "correo@gmail.com",
                                                              "PASSWORD": "123456",
                                                              "STATUS": 1,
                                                              "CREATED_AT": "0220-12-03T00:57:36.000Z",
                                                              "UPDATED_AT": "0220-12-03T00:57:36.000Z"
                                                            }
                                                          ]
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                      }
                                                
                                            

Notas de implementación

Genera el token de authorization

Response Json (Status 200)

Success

Url Request (POST)

http://localhost:3030/api/users/login

Param Request (JSON)

                                                
                                                    {
                                                        "user": {
                                                            "username": "achacbba12@gmail.com",
                                                            "password": "123456" 
                                                        },
                                                        "client":{
                                                            "ip": "181.188.191.226",
                                                            "country": "Bolivia",
                                                            "browser": "Firefox",
                                                            "device": "Linux"
                                                        }
                                                    }
                                                
                                            

Url Request (POST)

http://localhost:3030/api/users/login

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                          "token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"
                                                        },
                                                        "messaje": "Token de autentificación creada"
                                                      }
                                                
                                            

Notas de implementación

Registro de usuario

Response Json (Status 200)

Success

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
                                                    headers": {
                                                        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....",
                                                        "Content-Type": "application/json"
                                                    },
                                                    data: {
                                                        "user": {
                                                            "username": "tienda1@tiendasclick.com",
                                                            "password": "123456"
                                                        },
                                                        "userData": {
                                                            "name": "prueba1",
                                                            "last_name": "apellidos",
                                                            "celular": "77777770000",
                                                            "term_conditions": 1,
                                                            "birth_date": "2000-01-02"     //formato debe ser YYYY-MM-DD
                                                        }
                                                    }
                                                
                                            

Url Request (POST)

http://localhost:3030/api/users

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "usuario": {
                                                                "createdAt": "2022-06-18T06:36:17.403Z",
                                                                "updatedAt": "2022-06-18T06:36:17.404Z",
                                                                "id": 62,
                                                                "username": "test12@tiendasclick.com",
                                                                "active": 0,
                                                                "background_color": "#FFC286",
                                                                "id_user_dolibarr": 391,
                                                                "token": "a4f8c2a8ed32361758ecbbbfc0b5d7f1"
                                                            },
                                                            "userData": {
                                                                "createdAt": "2022-06-18T06:36:17.448Z",
                                                                "updatedAt": "2022-06-18T06:36:17.449Z",
                                                                "id": 48,
                                                                "name": "prueba1",
                                                                "last_name": "apellidos",
                                                                "celular": "77777770000",
                                                                "term_conditions": true,
                                                                "birth_date": "2000-01-02",     
                                                                "id_user": 62
                                                            }
                                                        },
                                                        "message": "Acción realizada con exíto, mail enviado, contactase con el administrador."
                                                    }
                                                
                                            

Notas de implementación

Actualización de usuario

Response Json (Status 200)

Success

Condición: Token Autrorization (401 Unauthorized), data(JSON)

                                                
                                                    headers": {
                                                        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9....",
                                                        "Content-Type": "application/json"
                                                    },
                                                    data: {
                                                        "user": {
                                                            "id": 3,
                                                            "username": "prueba@gmail.com",
                                                            "password": "1234567",
                                                        },
                                                        "userData": {
                                                            "id": 37,
                                                            "name": "prueba0",
                                                            "last_name": "apellidos0",
                                                            "celular": "77777770000",
                                                            "term_conditions": 1,
                                                            "birth_date": "2000-01-02"
                                                        }
                                                    }
                                                
                                            

Url Request (PUT)

http://localhost:3030/api/users

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "usuario": {
                                                                "id": 51,
                                                                "id_user_dolibarr": 391,
                                                                "token": "a3d096f423240b32b9d71541611de372",
                                                                "username": "test1@tiendasclick.com",
                                                                "active": 0,
                                                                "background_color": "#A2D2FF",
                                                                "createdAt": "2022-06-18T05:44:02.000Z",
                                                                "updatedAt": "2022-06-20T03:56:33.331Z"
                                                            },
                                                            "userData": {
                                                                "id": 37,
                                                                "id_user": 51,
                                                                "name": "prueba0",
                                                                "last_name": "apellidos0",
                                                                "documento_identidad": null,
                                                                "celular": "77777770000",
                                                                "birth_date": "2000-01-02",
                                                                "term_conditions": 1,
                                                                "createdAt": "2022-06-18T05:44:02.000Z",
                                                                "updatedAt": "2022-06-20T03:56:33.415Z"
                                                            }
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                    }
                                                
                                            

Notas de implementación

Confirmación de cuenta de usuario

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/users/confirm-account?token_confirm=c53a58...&token_user=53357e...

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": true,
                                                        "message": "Acción realizada con exíto, cuenta achacbba15@gmail.com activada"
                                                    }
                                                
                                            

Notas de implementación

Solicitud de cambio de contraseña

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/users/request-change-password?username=achacbba12@gmail.com

Response

                                                
    {
        "result": true,
        "data": {
            "usuario": {
                "createdAt": "2021-02-11T02:25:18.495Z",
                "updatedAt": "2021-02-11T02:25:18.496Z",
                "active": 1,
                "id": 4,
                "token": "b84a8274209cc091cfcef131f4a1c998",
                "id_user": 40
            }
        },
        "message": "Acción realizada con exíto, mail enviado"
    }
                                                
                                            

Notas de implementación

Cambio de contraseña

Response Json (Status 200)

Success

Url Request (POST)

http://localhost:3030/api/users/change-password
                                                
    {
        "change_password": {
            "token": "b84a8274209cc091cfcef131f4a1c998"
        },
        "user": {
            "token": "53357e16ab8a40681b1b5d021c0e3084",
            "password": "123456"
        }
    }
                                                
                                            


Response

                                                
    {
        "result": true,
        "data": true,
        "message": "Acción realizada con exíto, password de la achacbba12@gmail.com actualizada"
    }
                                                
                                            

Notas de implementación

Registro de datos de facturación

Response Json (Status 200)

Success

Url Request (POST)

http://localhost:3030/api/data-invoices

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                

    {
        "dataInvoice": {
            "name": "prueba1",
            "last_name": "apellidos",
            "celular": "77777770000",
            "email": "correo2@gmail.com",
            "nit": "12345678",
            "razon_social": "razon social",
            "entidad_financiera": "",
            "cuenta_bancaria": "",
    
            //incluir estos datos para envio a domicilio,
            "id_zone": 1,
            "address": "77777777",
            "nro_house": "50",
            "name_optional": "nombre alternativo",
            "urbanizacion": "urbanizacion barrrio"

            //datos opcionales
            "information_optional": "",
            "referent_optional": ""
        }
    }
                                                
                                            


Response

                                                
            {
                "result": true,
                "data": {
                    "dataInvoice": {
                        "createdAt": "2021-03-18T23:05:17.640Z",
                        "updatedAt": "2021-03-18T23:05:17.641Z",
                        "id": 4,
                        "id_zone": 1,
                        "name": "prueba1",
                        "last_name": "apellidos",
                        "celular": "77777777",
                        "nit": "12345678",
                        "razon_social": "razon social",
                        "address": "77777777",
                        "nro_house": "50",
                        "name_optional": "nombre alternativo",
                        "information_optional": "razon social",
                        "referent_optional": "77777777",
                        "id_user": 1
                    }
                },
                "message": "Acción realizada con exíto."
            }
                                                
                                            

Notas de implementación

Obtiene los datos de facturación de un determinado usuario

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/data-invoices/user/:id_user

id_user: identificador del usuario



Response

                                                
           {
                "result": true,
                "data": {
                    "dataInvoice": {
                        "id": 1,
                        "id_user": 1,
                        "id_zone": 1,
                        "name": "prueba1",
                        "last_name": "apellidos",
                        "celular": 77777777,
                        "nit": 12345678,
                        "razon_social": "razon social",
                        "address": "77777777",
                        "nro_house": "50",
                        "name_optional": "nombre alternativo",
                        "information_optional": "razon social",
                        "referent_optional": "77777777",
                        "createdAt": "2021-03-18T04:47:24.000Z",
                        "updatedAt": "2021-03-18T04:47:24.000Z"
                    }
                },
                "message": "Acción realizada con exíto."
            }
                                                
                                            

Notas de implementación

Obtiene los datos de facturación del usuario autentificado

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/data-invoices/user-authenticated

Condición: Token Autrorization (401 Unauthorized), data (JSON)


Response

                                                
           {
                "result": true,
                "data": {
                    "dataInvoice": {
                        "id": 1,
                        "id_user": 1,
                        "id_zone": 1,
                        "name": "prueba1",
                        "last_name": "apellidos",
                        "celular": 77777777,
                        "nit": 12345678,
                        "razon_social": "razon social",
                        "address": "77777777",
                        "nro_house": "50",
                        "name_optional": "nombre alternativo",
                        "information_optional": "razon social",
                        "referent_optional": "77777777",
                        "createdAt": "2021-03-18T04:47:24.000Z",
                        "updatedAt": "2021-03-18T04:47:24.000Z"
                    }
                },
                "message": "Acción realizada con exíto."
            }
                                                
                                            

Notas de implementación

Listado de los departamentos registrados

Response Json (Status 200)

Success

Url Request (POST)

http://localhost:3030/api/departments

Response

                                                
        {
            "result": true,
            "data": {
                "deparments": [
                    {
                        "id": 1,
                        "name": "COCHABAMBA",
                        "code": "CB",
                        "createdAt": "2021-03-17T21:11:18.000Z",
                        "updatedAt": "2021-03-17T21:11:18.000Z"
                    },
                    {
                        "id": 2,
                        "name": "LA PAZ",
                        "code": "LP",
                        "createdAt": "2021-03-17T21:11:27.000Z",
                        "updatedAt": "2021-03-17T21:11:27.000Z"
                    },
                    ...
                ]
            },
            "message": "Acción realizada con exíto"
        }
                                                
                                            

Notas de implementación

Listado de zonas por departamentos

Response Json (Status 200)

Success

Url Request (POST)

http://localhost:3030/api/zones/department/:id_department

id_department: Identificador del departamento


Response

                                                
        {
            "result": true,
            "data": {
                "zones": [
                    {
                        "id": 1,
                        "id_department": 1,
                        "name": "CERCADO",
                        "code": "CERCADO",
                        "price": "0.00",
                        "createdAt": "2021-03-17T23:09:27.000Z",
                        "updatedAt": "2021-03-17T23:09:27.000Z"
                    },
                    {
                        "id": 2,
                        "id_department": 1,
                        "name": "PUNATA",
                        "code": "PUNATA",
                        "price": "0.00",
                        "createdAt": "2021-03-17T23:57:58.000Z",
                        "updatedAt": "2021-03-17T23:57:58.000Z"
                    },
                    ...
                ]
            },
            "message": "Acción realizada con exíto"
        }
                                                
                                            

Notas de implementación

Registro de nueva zona

Response Json (Status 200)

Success

Url Request (POST)

localhost:3030/api/zones

Condición: Token Autrorization (401 Unauthorized), data (JSON)

Request

                                                
        {
            "zone":{
                "id_department": 2,
                "name": "uno",
                "code": "uno",
                "price": 10.5,
                "url_img": "data:image/png;base64,iVBORw0KGgoAAAA......."
            }
        }
                                                
                                            

Response

                                                
        {
            "result": true,
            "data": {
                "rol": {
                    "createdAt": "2021-03-19T02:24:35.874Z",
                    "updatedAt": "2021-03-19T02:24:35.874Z",
                    "id": 5,
                    "id_department": 2,
                    "name": "uno",
                    "code": "uno",
                    "price": 10.5
                }
            },
            "message": "Acción realizada con exíto"
        }
                                                
                                            

Notas de implementación

Registro de nueva zona

Response Json (Status 200)

Success

Url Request (PUT)

http://localhost:3030/api/zones

Condición: Token Autrorization (401 Unauthorized), data (JSON)

Request

                                                
    {
        "zone":{
            "id": 5,
            "id_department": 1,
            "name": "unoss",
            "code": "unoss",
            "price": 10.7,
            "url_img": "data:image/png;base64,iVBORw0KGgoAAAA......."
        }
    }
                                                
                                            

Response

                                                
    {
        "result": true,
        "data": {
            "zone": {
                "id": 5,
                "id_department": 2,
                "name": "unoss",
                "code": "unoss",
                "price": 10.7,
                "createdAt": "2021-03-19T02:24:35.000Z",
                "updatedAt": "2021-03-19T02:48:46.308Z"
            }
        },
        "message": "Acción realizada con exíto"
    }
                                                
                                            

Notas de implementación

Obtiene la lista de orders

Response Json (Status 200)

Success

Url Request (GET)

Sin Usuario: http://localhost:3030/api/orders?page=1&limit=5
Con Usuario: http://localhost:3030/api/orders?page=1&limit=5&id_user=2

Condición: Token Autrorization (401 Unauthorized), data (JSON)

page: pagina actual dato obligatorio
limit: total de registros a extraer dato obligatorio
id_user: usuario del cual se desea extraer datos, dato opcional, en caso no exista se procedera a extraer del usuario autentificado

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    },
           
                                                
                                            

Response

                                                
    {
        "result": true,
        "page": 3,
        "limit": 5,
        "total": 39,
        "totalPage": 8,
        "data": {
            "order": [
                {
                    "id": 29,
                    "id_user": 1,
                    "id_order_dolibarr": 4426,
                    "active": 1,
                    "erase": 0,
                    "numero": "borrador_4426",
                    "createdAt": "2021-01-22T03:55:28.000Z",
                    "updatedAt": "2021-01-22T03:55:28.000Z",
                    "total_products": 2,
                    "User": {   //usuario que ha realido la compra de la order
                        "id": 1,
                        "username": "achacbba@gmail.com",
                        "createdAt": "2021-01-04T02:28:13.000Z",
                        "updatedAt": "2021-01-04T02:28:13.000Z"
                    },
                    "exist_in_dolibar": true
                },
                ...
                "exist_in_dolibar": true
                }
            ]
        },
        "message": "Acción realizada con exíto"
    }
                                                
                                            

Notas de implementación

Obtiene la lista de Productos asociadas a una order

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/orders/product-by-order?page=1&limit=5&id_order=33

Condición: Token Autrorization (401 Unauthorized), data (JSON)

page: pagina actual dato obligatorio
limit: total de registros a extraer dato obligatorio
id_order: order del cual se desea extraer datos, dato obligatorio

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    },
           
                                                
                                            

Response

                                                
    {
        "result": true,
        "page": 1,
        "limit": 5,
        "total": 2,
        "totalPage": 1,
        "data": {
            "product": [
                {
                    "id": 71,
                    "id_line": 33,
                    "id_user": 1,
                    "id_product_dolibarr": 7127,
                    "ref": "7127",
                    "name": "nombre del producto",
                    "litle_description": "descripcion corta de 7127",
                    "description": "description del producto",
                    "quantity": 1,
                    "price": "15.16",
                    "sub_total": "15.16",
                    "type_product": null,
                    "createdAt": "2021-01-22T04:01:18.000Z",
                    "updatedAt": "2021-01-22T04:01:24.000Z",
                    "Line": {
                        "id": 33,
                        "id_order": 33,
                        "id_line_dolibarr": 21301,
                        "createdAt": "2021-01-22T04:01:24.000Z",
                        "updatedAt": "2021-01-22T04:01:24.000Z",
                        "Order": {
                            "id": 33,
                            "id_user": 1,
                            "id_order_dolibarr": 4430,
                            "active": 0,
                            "erase": 0,
                            "numero": "PEDIDO-003896",
                            "createdAt": "2021-01-22T04:01:23.000Z",
                            "updatedAt": "2021-01-22T18:17:58.000Z"
                        }
                    }
                },
                ...
            ]
        },
        "message": "Acción realizada con exíto"
    }
                                                
                                            

Notas de implementación

Permite agregar un documento a una determinada orden, bajo un tipo especifico de documento.

Response Json (Status 200)

Success

Url Request (POST)

http://localhost:3030/api/orders/document-order

Condición: Token Autrorization (401 Unauthorized), data (JSON)

Request

                                                
    {
        "order": {
            "id": 1
        },
        "document":{
            "id_type_document": 2,
            "image": " data:image/jpeg;base64,/9j/4AAQSkZJRk="
        }
    }
                                                
                                            

Response

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "document": {
                                                                "createdAt": "2021-02-19T04:30:26.136Z",
                                                                "updatedAt": "2021-02-19T04:30:26.137Z",
                                                                "id": 3,
                                                                "id_order": 1,
                                                                "id_type_document": 2,
                                                                "url": "/public/upload/order/document/borrador_5116.jpg",
                                                                "contentType": "data:image/jpg",
                                                                "size": "6.857"
                                                            }
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                    }
                                                
                                            

Notas de implementación

Permite anular una orden especifica mediante su identificador unico

Response Json (Status 200)

Success

Url Request (PUT)

https://localhost:3443/api/orders/cancel-order

Condición: Token Autrorization (401 Unauthorized), data (JSON)

Request

                                                
        {
            "order": {
                "id": 120
            }
        }
                                                
                                            

Response

                                                
            {
                "result": true,
                "data": {
                    "order": {
                        "id": 147,
                        "id_user": 6,
                        "id_data_invoice": 166,
                        "id_order_dolibarr": 7506,
                        "id_invoice_dolibarr": null,
                        "id_shipping_dolibarr": null,
                        "active": 0,
                        "erase": 0,
                        "status": "CANCELADO",
                        "numero": "PEDIDO-006903",
                        "createdAt": "2021-12-14T13:47:55.000Z",
                        "updatedAt": "2021-12-14T14:13:54.000Z"
                    }
                },
                "message": "La orden con número PEDIDO-006903, ha cambiado de estado a CANCELADO."
            }
                                                
                                            

Notas de implementación

Permite anular una orden especifica mediante un rango de fecha especifico, para aquellos que pasado un tiempo de 3 dias, han estado sin actividad

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/orders/cancel-order-three-days-ago

Condición: Token Autrorization (401 Unauthorized), data (JSON)

Response

                                                
            {
                "result": true,
                "data": {
                    "order": [
                        {
                            "id": 112,
                            "id_user": 7,
                            "id_data_invoice": 131,
                            "id_order_dolibarr": 7470,
                            "id_invoice_dolibarr": null,
                            "id_shipping_dolibarr": null,
                            "active": 0,
                            "erase": 0,
                            "status": "CANCELADO",
                            "numero": "PEDIDO-006867",
                            "createdAt": "2021-12-02T20:42:40.000Z",
                            "updatedAt": "2021-12-14T15:30:28.000Z"
                        },
                        ....
                        {
                            "id": 74,
                            "id_user": 6,
                            "id_data_invoice": 93,
                            "id_order_dolibarr": 7432,
                            "id_invoice_dolibarr": null,
                            "id_shipping_dolibarr": null,
                            "active": 0,
                            "erase": 0,
                            "status": "CANCELADO",
                            "numero": "PEDIDO-006831",
                            "createdAt": "2021-11-29T18:25:36.000Z",
                            "updatedAt": "2021-12-14T15:30:29.000Z"
                        }
                    ]
                },
                "message": "Entre las las fechas 2021-11-29 - 2021-12-11, se han actualizado un total de  32"
            }
                                                
                                            

Notas de implementación

Permite agregar una factura a una orden especifica, la cual ha de ser enviada via correo electronico, cuando la orden se de por facturada

Response Json (Status 200)

Success

Url Request (POST)

https://localhost:3443/api/orders/upload-document-invoice-order

Condición: Token Autrorization (401 Unauthorized), data (JSON)

Request

                                                
        {
            "order": {
                "id": 95
            },
            "document":{
                "id_type_document": 2,
                "image": " data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxITEhUREhIRERUXFRUXFRcWFxUVGhUVFxUXFhgVFxYYHSggGBolGxcYITIhJSkrLi4uFx8zODMsNygtLisBCgoKDg0OGxAQGy0lHyUtLS0vLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tLf/AABEIALcBEwMBEQACEQEDEQH/xAAc...."
            }
        }
                                                
                                            

Response

                                                
        {
            "result": true,
            "data": {
                "document": {
                    "createdAt": "2021-12-15T02:35:20.589Z",
                    "updatedAt": "2021-12-15T02:35:20.597Z",
                    "id": 62,
                    "id_order": 95,
                    "id_type_document": 1,
                    "url": "https://www.equipo-mt.com:3443/public/upload/order/document/PEDIDO-006852_INVOICE.jpeg",
                    "contentType": "data:image/jpeg",
                    "size": "6.857"
                }
            },
            "message": "Acción realizada con exíto"
        }
                                                
                                            

Notas de implementación

Buscador de productos

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/products/search-product?page=1&limit=5&image_width=300&image_height=200&text=router

http://localhost:3030/api/products/search-product?page=1&limit=5&text=router

page: pagina actual dato obligatorio
limit: total de registros a extraer dato obligatorio
text: texto que se desea buscar, dato obligatorio

Response: productos registrados

                                                
    {
        "result": true,
        "data": {
            "products": [
                {
                    "product_id": "7123",
                    "label": "ROUTER TP-LINK TL-WA901ND 450 Mbps",
                    "description": "",
                    "ref": "ID_0000001",
                    "price": "35.50000000",
                    "sale_price_category_id": "2599",
                    "percentage_of_purchase_price": null,
                    "sale_price": null
                },
                ....
            ]
        },
        "message": "Acción realizada con exíto"
    }                                                
                                                
                                            

Notas de implementación

Generador del reporte exel de productos detallado

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/products/generate-product-report

Response: Reporte del excel

Notas de implementación

Lista detallado de productos

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/products/detail-product-stock

Response:

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                          "listDetailStock": [
                                                            {
                                                              "code": "ID_0000001",
                                                              "description": "ROUTER DE RED TP-LINK TL-WA901ND 450 Mbps",
                                                              "price": "35.50",
                                                              "physicalStock": "0",
                                                              "prices": "SILVER",
                                                              "typeOfProduct": "ROUTER DE RED ",
                                                              "brand": "TP-LINK",
                                                              "model": "TL-WA901ND"
                                                            },
                                                            ...
                                                          ]
                                                        },   
                                                        "message": "Acción realizada con exíto"
                                                    }                                               
                                                
                                            

Notas de implementación

Lista de productos anexados al carrito de compras

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/shopping-cart/

Condición: Token Autrorization (401 Unauthorized), data(JSON)

Response: productos registrados

                                                
    {
        "result": true,
        "data": {
            "products": [
                {
                    "id": 3,
                    "id_line": null,
                    "id_user": 1,
                    "id_product_dolibarr": 7127,
                    "ref": "7127",
                    "name": "nombre del producto",
                    "litle_description": "descripcion corta de 7127",
                    "description": "description del producto",
                    "quantity": 1,
                    "type_product": null,
                    "createdAt": "2021-01-11T01:36:53.000Z",
                    "updatedAt": "2021-01-11T01:36:53.000Z"
                },
                {
                    ...
                }
            ]
        },
        "message": "Acción realizada con exíto"
    }
                                                
                                            

Notas de implementación

Lista de productos paginados anexados al carrito de compras

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/shopping-cart/pagination?page=1&limit=10

Condición: Token Autrorization (401 Unauthorized), data(JSON)

Response: productos paginados registrados

                                                
    {
        "result": true,
        "page": 1,
        "limit": 5,
        "total": 7,
        "totalPage": 2,
        "data": {
            "products": [
                {
                    "id": 3,
                    "id_line": null,
                    "id_user": 1,
                    "id_product_dolibarr": 7127,
                    "ref": "7127",
                    "name": "nombre del producto",
                    "litle_description": "descripcion corta de 7127",
                    "description": "description del producto",
                    "quantity": 1,
                    "type_product": null,
                    "createdAt": "2021-01-11T01:36:53.000Z",
                    "updatedAt": "2021-01-11T01:36:53.000Z"
                },
                ...
            ]
        },
        "message": "Acción realizada con exíto"
    }
                                                
                                            

Notas de implementación

Elimina un producto del carrito de compras

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/shopping-cart/delete-product/12

Condición: Token Autrorization (401 Unauthorized), data(JSON)

Response: productos paginados registrados

                                                
    {
        "result": true,
        "data": {
            "product": true
        },
        "message": "Acción realizada con exíto"
    }
                                                
                                            

Notas de implementación

Elimina todos los productos del carrito de compras

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/shopping-cart/clear

Condición: Token Autrorization (401 Unauthorized), data(JSON)

Response:

                                                
                                                    {
                                                        "result": true,
                                                        "data": true,
                                                        "message": "Acción realizada con exíto"
                                                    }
                                                
                                            

Notas de implementación

Actualiza un producto del carrito de compras

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/shopping-cart/update-product

Condición: Token Autrorization (401 Unauthorized), data(JSON)

                                                
    {
        "product": {
            "id": 6,
            "quantity": 4
            ... resto de atributos, excepto la id de dolibarr
        }
    }
                                                
                                            

Response:

                                                
    {
        "result": true,
        "data": {
            "product": true
        },
        "message": "Acción realizada con exíto"
    }
                                                
                                            

Notas de implementación

Registra un nuevo producto en la base de datos del carrito de compras, bajo dos criterios (Objeto simple y Lista de Objetos)

Response Json (Status 200)

Success

Url Request (POST)

http://localhost:3030/api/shopping-cart/add-products

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                            
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    },
    "data": JSON.stringify(dataJson),

    dataJson = {
        "products":[
            {
                "name": "nombre del producto",
                "description": "description del producto",
                "quantity": 1,
                "id_product_dolibarr": 7127,
                "ref": "7127",
                "litle_description": "descripcion corta de 7127",
                "price": 16.90,
                "sub_total": 16.90
            },
            {
                "name": "nombre del producto 7128",
                "description": "description del producto 7128",
                "quantity": 1,
                "id_product_dolibarr": 7128,
                "ref": "7128" ,
                "litle_description": "descripcion corta de 7128",
                "price": 19.90,
                "sub_total": 19.90
            }
        ]
    }

    or

    dataJson = {
        "product":{
            "name": "nombre del producto",
            "description": "description del producto",
            "quantity": 1,
            "id_product_dolibarr": 7127,
            "ref": "7127",
            "litle_description": "descripcion corta de 7127",
            "price": 16.90,
            "sub_total": 16.90
        }
    }
                                            
                                        

Response: productos registrados

                                            
    {
        "result": true,
        "data": {
            "products": [
                {
                    "ID": 65,
                    "ID_LINE": null,
                    "ID_USER": 1,
                    "ID_PRODUCT_DOLIBARR": 7127,
                    "REF": null,
                    "NAME": "nombre del producto",
                    "LITLE_DESCRIPTION": null,
                    "DESCRIPTION": "description del producto",
                    "QUANTITY": 1,
                    "TYPE_PRODUCT": null,
                    "CREATED_AT": "2020-12-22T02:39:20.000Z",
                    "UPDATED_AT": "2020-12-22T02:39:20.000Z"
                },
                {
                    "ID": 66,
                    "ID_LINE": null,
                    "ID_USER": 1,
                    "ID_PRODUCT_DOLIBARR": 7128,
                    "REF": null,
                    "NAME": "nombre del producto 7128",
                    "LITLE_DESCRIPTION": null,
                    "DESCRIPTION": "description del producto 7128",
                    "QUANTITY": 2,
                    "TYPE_PRODUCT": null,
                    "CREATED_AT": "2020-12-22T02:39:20.000Z",
                    "UPDATED_AT": "2020-12-22T02:39:20.000Z"
                }
            ]
        },
        "message": "Acción realizada con exíto"
    }
                                            
                                        

Notas de implementación

Genera una orden en modo borrador con los productos en el carrito, todos estos productos se asocian al usuario

Response Json (Status 200)

Success

Url Request (POST)

http://localhost:3030/api/shopping-cart/generate-order

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    },

    {
        "dataInvoice": {
            //caso recogo en tienda
            "name": "prueba1",
            "last_name": "apellidos",
            "celular": "77777770000",
            "nit": "12345678",
            "razon_social": "razon social",

            //para el caso de envio a nivel nacional 
            "id_department": "10",

            //para el caso de envio solo a cochabamba
            "id_department": "10",
            "id_zone": 1,
            "address": "77777777",
            "nro_house": "50",
            "name_optional": "nombre alternativo",
            "information_optional": "razon social",
            "referent_optional": "77777777"
        }
    }
                                                
                                            

Response: order generada

                                                
    {
        "result": true,
        "data": {
            "order": {
                "createdAt": "2021-01-02T19:34:01.111Z",
                "updatedAt": "2021-01-02T19:34:01.111Z",
                "erase": 0,
                "id": 80,
                "id_user": 1,
                "id_order_dolibarr": 4350,
                "active": true,
                "numero": "borrador_4350"
            }
        },
        "message": "Acción realizada con exíto"
    }
                                                
                                            

Notas de implementación

Permite validar una order generada anteriormente, esta order una vez validada esta lista para aprobada por el personal autorizado.

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/shopping-cart/validate-order

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    },
    
    "data": JSON.stringify(dataJson),

    dataJson = {
        "order": {
            "id": 80
        }
    }
                                                
                                            

Response: resultado de la operación

                                            
    {
        "result": true,
        "data": {
            "order": "Orden actualizada"
        },
        "message": "Acción realizada con exíto"
    }
                                            
                                            

Notas de implementación

Permite cancelar una order generada anteriormente, esta order una vez cancelada cambia de estado en su columna "erase".

Response Json (Status 200)

Success

Url Request (DELETE)

http://localhost:3030/api/shopping-cart/:id (http://localhost:3030/api/shopping-cart/80)

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    }
                                                
                                            

Response: resultado de la operación

                                            
    {
        "result": true,
        "data": {
            "orden": "Orden eliminada"
        },
        "message": "Acción realizada con exíto"
    }
                                            
                                            

Notas de implementación

Permite facturar una order, permite generar la factura y preparar el envio de una orden especifica.

Response Json (Status 200)

Success

Url Request (POST)

localhost:3030/api/shopping-cart/invoice-from-order

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    }
                                                
                                            

Request:

                                            
    {
        "order": {
            "id": 42
        }
    }
                                            
                                            

Response: resultado de la operación

                                            
    {
        "result": true,
        "data": {
            "orden": "Orden PEDIDO-004729 facturado con exito"
        },
        "message": "Acción realizada con exíto, mail no enviado, contactase con el administrador."
    }
                                            
                                            
//////////////

Notas de implementación

Registra un nuevo descuento a un producto en la base de datos,bajo dos criterios

1.- Descuento Fijo o Porcentual

2.- Producto debe pertener a una Orden "VALIDADA"

3.- Orden debe estar registrado en DOLI con estado "VALIDADA"

Response Json (Status 200)

Success

Url Request (POST)

https://localhost:3443/api/shopping-cart/products/add-discount

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    },
    "data": JSON.stringify(dataJson),

    dataJson = {
        "product": {
            "id": 268,
            "discount": 10,
            "type_discount": "FIXED"
        }
    }

                                                
                                            

Response: resultado de la operación

                                                
    {
        "result": true,
        "data": {
            "product": {
                "id": 268,
                "id_line": 231,
                "id_user": 32,
                "id_product_dolibarr": 7162,
                "ref": "ID_0000040",
                "name": "CABLE ADATA AMFIAL-100CMK-CSV USB",
                "litle_description": "CABLE ADATA AMFIAL-100CMK-CSV USB",
                "description": null,
                "quantity": 1,
                "price": "7.90",
                "price_dolibarr": "0.00",
                "type_discount": "FIXED",
                "discount": 10,
                "sub_total": "7.90",
                "createdAt": "2021-12-30T18:56:23.000Z",
                "updatedAt": "2022-09-08T01:19:07.507Z"
            }
        },
        "message": "Acción realizada con exíto"
    }
                                                
                                            
///////////////

Notas de implementación

Listado de tipos de productos

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/type-documents

Response: Tipos de documentos registrados

                                                
    {
        "result": true,
        "data": {
            "type_document": [
                {
                    "id": 1,
                    "name": "Factura",
                    "code": "FACTURA",
                    "createdAt": "2021-02-18T21:49:40.000Z",
                    "updatedAt": "2021-02-18T21:49:40.000Z"
                },
                {
                    "id": 2,
                    "name": "Recibo de Pago",
                    "code": "RECIBO_PAGO",
                    "createdAt": "2021-02-18T21:49:40.000Z",
                    "updatedAt": "2021-02-18T21:49:40.000Z"
                }
            ]
        },
        "message": "Acción realizada con exíto"
    }                                               
                                                
                                            

Notas de implementación

Listado de Comisiones para los ejecutivos de ventas

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/executive-sales-commission?image_width=30&image_height=30

Response: Comisiones para los ejecutivos de ventas registrados

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                          "products": [
                                                            {
                                                              "id": "7123",
                                                              "product_id": "7123",
                                                              "label": "ROUTER DE RED TP-LINK TL-WA901ND 450 Mbps",
                                                              "ref": "ID_0000001",
                                                              "image_url": [
                                                              ],
                                                              "original_price": 35.5,
                                                              "commission_percentage": 0,
                                                              "sale_price": 37.37,
                                                              "sale_price_category_id": 2597
                                                            },
                                                            ...
                                                            {
                                                              "id": "8783",
                                                              "product_id": "8783",
                                                              "label": "TARJETA DE VIDEO INNO3D N166S2-06D6-1712VA15 GEFORCE GTX 1660 SUPER TWIN X2 1785Mhz 14Gbps 6GB GDDR6/192-Bit DPx3 HDMI",
                                                              "ref": "ID_0001652",
                                                              "image_url": [
                                                              ],
                                                              "original_price": 0,
                                                              "commission_percentage": 0,
                                                              "sale_price": 0,
                                                              "sale_price_category_id": 0
                                                            }
                                                          ]
                                                        },
                                                        "message": "Acción realizada con exíto"
                                                      }                                              
                                                
                                            

Notas de implementación

Permite Sincronizar los precios de venta con las Comisiones para los ejecutivos de ventas de acuerdo a los productos y sus respectivas categorias

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/executive-sales-commission/loads-commision

Response: Sincronización de los precios de venta y las comisiones de venta por ejecutivos

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                          "products": [
                                                            {
                                                              "id_category": "2597",
                                                              "id_product": 7123,
                                                              "price_product": 35.5,
                                                              "product_price_category": 37.37,
                                                              "commission_percentage": 0,
                                                              "commission_pay": 0
                                                            },
                                                            ............
                                                            {
                                                              "id_category": "2598",
                                                              "id_product": 7564,
                                                              "price_product": 121,
                                                              "product_price_category": 127.37,
                                                              "commission_percentage": 0,
                                                              "commission_pay": 0
                                                            }
                                                          ]
                                                        },
                                                        "message": "Acción realizada con exíto, se han actualizado un total de 135 producto(s)"
                                                      }                                            
                                                
                                            

Notas de Implementación

Permite Configurar la Categoria con los productos y sus respectivas comisiones de ventas para los ejecutivos

Response Json (Status 200)

Success

Url Request (POST)

https://localhost:3443/api/executive-sales-commission/configure-category-commission-product

Body POST

                                                {
                                                    "executiveSalesCommission": 
                                                        {
                                                            "id_category": 2597,
                                                            "commission": 3
                                                        }
                                                }
                                            

Response: Configuración Producto, Comission y Categoria

                                                
                                                    {
                                                        "result": true,
                                                        "data": {
                                                            "products": [
                                                                {
                                                                    "id": 811,
                                                                    "id_product": 7123,
                                                                    "id_category": 2597,
                                                                    "price_product": 35.5,
                                                                    "product_price_category": 37.37,
                                                                    "commission_percentage": 3,
                                                                    "commission_pay": 0,
                                                                    "createdAt": "2021-10-04T04:19:49.000Z",
                                                                    "updatedAt": "2021-10-08T01:19:15.178Z"
                                                                },
                                                                {
                                                                    "id": 812,
                                                                    "id_product": 7124,
                                                                    "id_category": 2597,
                                                                    "price_product": 4.9,
                                                                    "product_price_category": 5.16,
                                                                    "commission_percentage": 3,
                                                                    "commission_pay": 0,
                                                                    "createdAt": "2021-10-04T04:19:49.000Z",
                                                                    "updatedAt": "2021-10-08T01:19:15.171Z"
                                                                }
                                                            ]
                                                        },
                                                        "message": "Acción realizada con exíto, se han actualizado un total de 131 producto(s)"
                                                    }                                    
                                                
                                            

Notas de implementación

Anadir productos a facebook se anade una lista de productos en el exel de google para que se visualice en facebook.

Response Json (Status 200)

Success

Url Request (GET)

http://localhost:3030/api/social-network/add-google-sheets

Response:

                                            
                                                {
                                                    "result": true,
                                                    "message": "Acción realizada con exíto"
                                                }                                               
                                            
                                        

Notas de implementación

Reporte de Ordenes Procesadas con las Categorias y los Comisiones de venta, para tal proposito se ha de requerir un par de fechas, para poder extraer dicha información

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/reports/ordenes-procesadas-by-categoria-precio/2021-05-05/2021-05-07

Response:

                                            
    {
        "result": true,
        "data": {
            "products": [
            {
                "id": "34925",
                "product_id": "34925",
                "ref": "ID_0000811",
                "label": "CAMARA WEB Redragon GW600 Fobos 720p",
                "image_url": [
                
                ],
                "sale_price": "31,90",
                "client": "RAUL MONTALVO",
                "nro_pedido": "PEDIDO-006320",
                "cantidad": "10",
                "categoria_precio": "GOLD",
                "comision": 1,
                "commision_pay": 0.32,
                "factura_fecha_registro": "2021-05-20T00:00:00.000Z",
                "factura_fecha_actualizacion": "2021-05-21T15:04:09.000Z",
                "user_author": "Pilar Sanabria"
            },
            ......
            {
                "id": "35188",
                "product_id": "35188",
                "ref": "ID_0001212",
                "label": "MEMORIA UDIMM KINGSTON HX432C16FB4/16 HyperX Fury 16GB DDR4 3200MHz C/Discipador",
                "image_url": [
                
                ],
                "sale_price": "99,00",
                "client": "ANDRES LAURA",
                "nro_pedido": "PEDIDO-006357",
                "cantidad": "5",
                "categoria_precio": "GOLD",
                "comision": 1,
                "commision_pay": 0.98,
                "factura_fecha_registro": "2021-05-06T00:00:00.000Z",
                "factura_fecha_actualizacion": "2021-05-17T11:23:46.000Z",
                "user_author": "BETTY CHUCAMANI AGUILAR"
            }
            ]
        },
        "message": "Acción realizada con exíto, se han encontrado un total de 163 producto(s)"
        }                                      
                                            
                                        

Notas de implementación

Reporte de Ordenes Procesadas con las Categorias y los Comisiones de venta, para tal proposito se ha de requerir un par de fechas, para poder extraer dicha información, toda la información sera exportada en un archivo con formato EXCEL (xlsx)

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/reports/ordenes-procesadas-by-categoria-precio-excel/2021-05-05/2021-05-07

Response:

                                            
    Descarga un archivo bajo la siguiente caracteristicas (OrdenesProcesadas202110142119.xlsx)
                                            
                                        

Notas de implementación

Reporte de Ordenes Emitidas con las Categorias y los Comisiones de venta, para tal proposito se ha de requerir un par de fechas, para poder extraer dicha información

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/reports/ordenes-issueds-by-categoria-precio/2021-09-28/2021-10-07

Response:

                                            
            {
                "result": true,
                "data": {
                    "products": [
                    {
                        "id": "37755",
                        "product_id": "37755",
                        "ref": "ID_0000002",
                        "label": "CONVERSOR DE PUERTO ADATA ACAF3PL-ADP-RBK USB-C a USB-A 3.1",
                        "image_url": [],
                        "sale_price": "4.90",
                        "client": "ANTONIO MARTINEZ",
                        "nro_pedido": "PEDIDO-006787",
                        "cantidad": "1",
                        "categoria_precio": "",
                        "tipo_producto": "CONVERSOR DE PUERTO ",
                        "marca": "ADATA",
                        "comision": 0,
                        "commision_pay": 0,
                        "user_author": "Service Web",
                        "total": "4.90",
                        "total_comision": 0,
                        "shipment_fecha_registro": "2021-11-05T15:40:24.000Z",
                        "shipment_fecha_validacion": "2021-11-05T15:40:29.000Z"
                    },
                    .......,
                    {
                        "id": "37756",
                        "product_id": "37756",
                        "ref": "ID_0000002",
                        "label": "CONVERSOR DE PUERTO ADATA ACAF3PL-ADP-RBK USB-C a USB-A 3.1",
                        "image_url": [],
                        "sale_price": "4.90",
                        "client": "ANTONIO MARTINEZ",
                        "nro_pedido": "PEDIDO-006787",
                        "cantidad": "1",
                        "categoria_precio": "",
                        "tipo_producto": "CONVERSOR DE PUERTO ",
                        "marca": "ADATA",
                        "comision": 0,
                        "commision_pay": 0,
                        "user_author": "Service Web",
                        "total": "4.90",
                        "total_comision": 0,
                        "shipment_fecha_registro": "2021-11-05T15:40:24.000Z",
                        "shipment_fecha_validacion": "2021-11-05T15:40:29.000Z"
                    }
                    ]
                },
                "message": "Acción realizada con exíto, se han encontrado un total de 2 producto(s)"
                }                                    
                                            
                                        

Notas de implementación

Reporte de Ordenes Emitidas con las Categorias y los Comisiones de venta, para tal proposito se ha de requerir un par de fechas, para poder extraer dicha información, toda la información sera exportada en un archivo con formato EXCEL (xlsx)

Response Json (Status 200)

Success

Url Request (GET)

http://www.equipo-mt.com:3030/api/reports/ordenes-issueds-by-categoria-precio-excel/2021-09-28/2021-10-07

Response:

                                            
    Descarga un archivo bajo la siguiente caracteristicas (OrdenesProcesadas202110142119.xlsx)
                                            
                                        

Notas de implementación

Permite registrar SERVICE en la base de datos.

Response Json (Status 200)

Success

Url Request (POST)

https://localhost:3443/api/rols/

Body POST

                {
                    "service":{
                        "name": "Usuario",
                        "code": "USUARIO"
                    }
                }
                                                

Response:

                                                
                {
                    "result": true,
                    "data": {
                        "service": {
                            "createdAt": "2021-11-16T01:50:30.404Z",
                            "updatedAt": "2021-11-16T01:50:30.405Z",
                            "id": 5,
                            "name": "Ventas",
                            "code": "VENTAS",
                            "id_user": 1
                        }
                    },
                    "message": "Acción realizada con exíto"
                }
                                                
                                            

Notas de implementación

Permite Actualizar un determinado ROL, mediante su identificador

Response Json (Status 200)

Success

Url Request (PUT)

https://localhost:3443/api/rols/

Body PUT

                {
                    "rol":{
                        "id": 1,
                        "name": "admin0",
                        "code": "ADMIN"
                    }
                }
                                                

Response:

                                                
                {
                    "result": true,
                    "data": {
                        "rol": {
                            "id": 1,
                            "id_user": 1,
                            "name": "admin0",
                            "code": "ADMIN",
                            "createdAt": "2021-11-13T03:48:40.000Z",
                            "updatedAt": "2021-11-16T00:57:15.743Z"
                        }
                    },
                    "message": "Acción realizada con exíto"
                }
                                                
                                            

Notas de implementación

Permite obtener un ROL, mediante su identificador principal

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/rols/by-id/1

Response:

                                                
            {
                "result": true,
                "data": {
                    "rol": {
                        "id": 1,
                        "id_user": 1,
                        "name": "admin0",
                        "code": "ADMIN",
                        "createdAt": "2021-11-13T03:48:40.000Z",
                        "updatedAt": "2021-11-16T00:57:15.000Z"
                    }
                },
                "message": "Acción realizada con exíto"
            }
                                                
                                            

Notas de implementación

Permite registrar SERVICIOS en la base de datos.

Response Json (Status 200)

Success

Url Request (POST)

https://localhost:3443/api/services/

Body POST

                {
                    "rol":{
                        "name": "admin",
                        "code": "ADMIN"
                    }
                }
                                                

Response:

                                                
                {
                    "result": true,
                    "data": {
                        "rol": {
                            "createdAt": "2021-11-16T00:53:54.950Z",
                            "updatedAt": "2021-11-16T00:53:54.950Z",
                            "id": 2,
                            "name": "Funcionario",
                            "code": "FUNCIOANRIO",
                            "id_user": 1
                        }
                    },
                    "message": "Acción realizada con exíto"
                }
                                                
                                            

Notas de implementación

Permite Actualizar un determinado SERVICIO, mediante su identificador

Response Json (Status 200)

Success

Url Request (PUT)

https://localhost:3443/api/services/

Body PUT

                {
                    "service":{
                        "id": 1,
                        "name": "Usuario0",
                        "code": "USUARIO"
                    }
                }
                                                

Response:

                                                
                {
                    "result": true,
                    "data": {
                        "service": {
                            "id": 1,
                            "id_user": 1,
                            "name": "Usuario0",
                            "code": "USUARIO",
                            "createdAt": "2021-11-13T03:58:15.000Z",
                            "updatedAt": "2021-11-16T02:06:28.334Z"
                        }
                    },
                    "message": "Acción realizada con exíto"
                }
                                                
                                            

Notas de implementación

Permite obtener un SERVICIO, mediante su identificador principal

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/services/by-id/1

Response:

                                                
        {
            "result": true,
            "data": {
                "service": {
                    "id": 1,
                    "id_user": 1,
                    "name": "Usuario0",
                    "code": "USUARIO",
                    "createdAt": "2021-11-13T03:58:15.000Z",
                    "updatedAt": "2021-11-16T02:06:28.000Z"
                }
            },
            "message": "Acción realizada con exíto"
        }
                                                
                                            

Notas de implementación

Permite registrar ACCIONES en la base de datos.

Response Json (Status 200)

Success

Url Request (POST)

https://localhost:3443/api/actions/

Body POST

                {
                    "action":{
                        "name": "create",
                        "code": "CREATE"
                    }
                }
                                                

Response:

                                                
                {
                    "result": true,
                    "data": {
                        "action": {
                            "createdAt": "2021-11-16T03:24:19.855Z",
                            "updatedAt": "2021-11-16T03:24:19.855Z",
                            "id": 4,
                            "name": "create1",
                            "code": "CREATE1",
                            "id_user": 1
                        }
                    },
                    "message": "Acción realizada con exíto"
                }
                                                
                                            

Notas de implementación

Permite Actualizar un determinado ACCION, mediante su identificador

Response Json (Status 200)

Success

Url Request (PUT)

https://localhost:3443/api/actions/

Body PUT

                {
                    "action":{
                        "id": 1,
                        "name": "create0",
                        "code": "CREATE"
                    }
                }
                                                

Response:

                                                
                {
                    "result": true,
                    "data": {
                        "action": {
                            "id": 1,
                            "id_user": 1,
                            "name": "create0",
                            "code": "CREATE",
                            "createdAt": "2021-11-13T04:01:21.000Z",
                            "updatedAt": "2021-11-16T03:29:01.225Z"
                        }
                    },
                    "message": "Acción realizada con exíto"
                }
                                                
                                            

Notas de implementación

Permite obtener un ACCION, mediante su identificador principal

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/actions/by-id/1

Response:

                                                
        {
            "result": true,
            "data": {
                "accion": {
                    "id": 1,
                    "id_user": 1,
                    "name": "create0",
                    "code": "CREATE",
                    "createdAt": "2021-11-13T04:01:21.000Z",
                    "updatedAt": "2021-11-16T03:29:01.000Z"
                }
            },
            "message": "Acción realizada con exíto"
        }
                                                
                                            

Notas de implementación

Lista paginada de Carruceles.

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/carrucels?page=1&limit=10

Body POST

Response:

                                                
            {
                "result": true,
                "page": 1,
                "limit": 10,
                "total": 1,
                "totalPage": 1,
                "data": {
                    "carrucels": [
                        {
                            "id": 3,
                            "id_user": 1,
                            "name": "Uno",
                            "code": "Code Uno",
                            "row": 1,
                            "delay": 2,
                            "created_at": "2022-04-05T03:16:11.000Z",
                            "updated_at": "2022-04-05T03:16:11.000Z",
                            "createdAt": "2022-04-05T03:16:11.000Z",
                            "updatedAt": "2022-04-05T03:16:11.000Z"
                        }
                    ]
                },
                "message": "Acción realizada con exíto"
            }
                                                
                                            

Notas de implementación

Permite registrar un Carrucel en la base de datos, la cual debera tener posteriromente un conjunto de imagenes asociadas a dicho Carrucel.

Response Json (Status 200)

Success

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    }
                                                
                                            

Url Request (POST)

https://localhost:3443/api/carrucels/

Body POST

                {
                    "carrucel": {
                        "name": "Uno",
                        "code": "Code Uno",
                        "row": 1,
                        "delay": 2,
                        "default": 1
                    }
                }
                                                

Response:

                                                
                {
                    "result": true,
                    "data": {
                        "carrucel": {
                            "created_at": "2022-04-05T18:20:28.680Z",
                            "updated_at": "2022-04-05T18:20:28.680Z",
                            "id": 1,
                            "name": "Uno",
                            "code": "Code Uno",
                            "row": 1,
                            "delay": 2,
                            "id_user": 1,
                            "updatedAt": "2022-04-05T18:20:28.681Z",
                            "createdAt": "2022-04-05T18:20:28.681Z"
                        }
                    },
                    "message": "Acción realizada con exíto"
                }
                                                
                                            

Notas de implementación

Permite Actualizar un determinado CARRUCEL, mediante su identificador

Response Json (Status 200)

Success

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    }
                                                
                                            

Url Request (PUT)

https://localhost:3443/api/carrucels/

Body PUT

                {
                    "carrucel": {
                        "id": 1,
                        "name": "Unos",
                        "code": "Code Dos",
                        "row": 1,
                        "delay": 3,
                        "default": 1
                    }
                }
                                                

Response:

                                                
                {
                    "result": true,
                    "data": {
                        "carrucel": {
                            "id": 2,
                            "id_user": 1,
                            "name": "Unos",
                            "code": "Code Dos",
                            "row": 1,
                            "delay": 3,
                            "created_at": "2022-04-05T03:13:59.000Z",
                            "updated_at": "2022-04-05T03:13:59.000Z",
                            "createdAt": "2022-04-05T03:13:59.000Z",
                            "updatedAt": "2022-04-05T22:32:45.001Z"
                        }
                    },
                    "message": "Acción realizada con exíto"
                }
                                                
                                            

Notas de implementación

Permite obtener un CARRUCEL, mediante su identificador principal

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/carrucels/3

Response:

                                                
            {
                "result": false,
                "data": {
                    "carrucel": {
                        "id": 3,
                        "id_user": 1,
                        "name": "Uno",
                        "code": "Code Uno",
                        "row": 1,
                        "delay": 2,
                        "created_at": "2022-04-05T03:16:11.000Z",
                        "updated_at": "2022-04-05T03:16:11.000Z",
                        "createdAt": "2022-04-05T03:16:11.000Z",
                        "updatedAt": "2022-04-05T03:16:11.000Z",
                        "carrucelImage": [
                            {
                                "id": 8,
                                "id_user": 1,
                                "id_carrucel": 3,
                                "name": "1649198635580_tienda3@tiendasclick.com.jpeg",
                                "mimeType": "data:image/jpeg",
                                "destination": "/home/acha/node_proyect/erp-api/public/upload/carrucel/",
                                "path": "https://www.equipo-mt.com:3443/api/carrucels-images/1649198635580_tienda3@tiendasclick.com.jpeg",
                                "size": 415,
                                "createdAt": "2022-04-05T22:43:55.000Z",
                                "updatedAt": "2022-04-05T22:43:55.000Z"
                            }
                        ]
                    }
                },
                "message": "Acción no completada, carrucel no eliminada"
            }
                                                
                                            

Notas de implementación

Permite obtener un CARRUCEL, el carrucel definido por defecto

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/carrucels/default/

Response:

                                                
            {
                "result": true,
                "data": {
                    "carrucel": {
                        "id": 2,
                        "id_user": 1,
                        "name": "Unos",
                        "code": "Code Dos 3 e",
                        "row": 1,
                        "delay": 3,
                        "default": 1,
                        "createdAt": "2022-04-07T22:59:03.000Z",
                        "updatedAt": "2022-04-08T00:27:16.000Z",
                        "carrucelImage": []
                    }
                },
                "message": "Acción realizada con exito"
            }
                                                
                                            

Notas de implementación

Permite eliminar un CARRUCEL, mediante su identificador principal

Response Json (Status 200)

Success

Url Request (DELETE)

https://localhost:3443/api/carrucels/1

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    }
                                                
                                            

Response:

                                                
    {
        "result": true,
        "data": {
            "carrucelDb": {
                "id": 2,
                "id_user": 1,
                "name": "Unos",
                "code": "Code Dos",
                "row": 1,
                "delay": 3,
                "created_at": "2022-04-05T03:13:59.000Z",
                "updated_at": "2022-04-05T03:13:59.000Z",
                "createdAt": "2022-04-05T03:13:59.000Z",
                "updatedAt": "2022-04-05T22:32:45.000Z"
            }
        },
        "message": "Acción realizada con exíto"
    }
                                                
                                            

Notas de implementación

Permite registrar un Carrucel Image en la base de datos, la cual debe estar asociada a un Carrucel.

Response Json (Status 200)

Success

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    }
                                                
                                            

Url Request (POST)

https://localhost:3443/api/carrucels-images

Body POST

                                                {
                                                    "carrucelImage": {
                                                        "id_carrucel": 3,
                                                        "id_parent_carrucel_image": 4,          // identificador del carrucel padre
                                                        "id_dispositivo": 1,                    // identificador del dispositivo
                                                        "image": "data:image/jpeg;base64,/9j/4AN4U475gv/2Q==....."
                                                    }
                                                }
                                            

Response:

                                                
    {
        "result": true,
        "data": {
            "image": {
                "createdAt": "2022-04-05T22:43:55.582Z",
                "updatedAt": "2022-04-05T22:43:55.583Z",
                "id": 8,
                "id_user": 1,
                "id_carrucel": 3,
                "name": "1649198635580_tienda3@tiendasclick.com.jpeg",
                "mimeType": "data:image/jpeg",
                "destination": "/home/acha/node_proyect/erp-api/public/upload/carrucel/",
                "path": "https://www.equipo-mt.com:3443/api/carrucels-images/1649198635580_tienda3@tiendasclick.com.jpeg",
                "size": "415.198"
            }
        },
        "message": "Acción realizada con exíto"
    }
                                                
                                            

Notas de implementación

Permite obtener un ACCION, mediante su identificador principal

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/carrucels-images/1649198635580_tienda3@tiendasclick.com.jpeg

Response:

                                                
    
                                                
                                            

Notas de implementación

Permite eliminar un CARRUCEL, mediante su identificador principal

Response Json (Status 200)

Success

Url Request (DELETE)

https://localhost:3443/api/carrucels-images/1

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    }
                                                
                                            

Response:

                                                
    {
        "result": true,
        "data": {
            "carrucelImage": {
                "id": 2,
                "id_user": 1,
                "id_carrucel": 1,
                "name": "1649121703335.jpeg",
                "mimeType": "data:image/jpeg",
                "destination": "/home/acha/node_proyect/erp-api/public/upload/carrucel/",
                "path": "https://www.equipo-mt.com:3443/public/upload/carrucel/1649121703335.jpeg",
                "size": 415,
                "createdAt": "2022-04-05T01:21:43.000Z",
                "updatedAt": "2022-04-05T01:21:43.000Z"
            }
        },
        "message": "Acción realizada con exíto"
    }
                                                
                                            

Notas de implementación

Retorna el listado de dispositivos.

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/dispositivos

Body GET

Response:

                                                
            {
                "result": true,
                "data": {
                    "dispositivos": [
                        {
                            "id": 1,
                            "code": "moviles",
                            "name": "Móviles",
                            "created_at": "2022-05-16T01:53:00.000Z",
                            "updated_at": "2022-05-16T01:53:00.000Z"
                        },
                        {
                            "id": 2,
                            "code": "tablets",
                            "name": "Tablets",
                            "created_at": "2022-05-16T01:53:00.000Z",
                            "updated_at": "2022-05-16T01:53:00.000Z"
                        },
                        ...
                    ]
                },
                "message": "Acción realizada con exíto"
            }
                                                
                                            

Notas de implementación

Retorna un dispositivo mediante su identificador.

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/dispositivos/1

Body GET

Response:

                                                
            {
                "result": true,
                "data": {
                    "dispositivo": {
                        "id": 1,
                        "code": "moviles",
                        "name": "Móviles",
                        "created_at": "2022-05-16T01:53:00.000Z",
                        "updated_at": "2022-05-16T01:53:00.000Z"
                    }
                },
                "message": "Acción realizada con exito"
            }
                                                
                                            

Notas de implementación

Retorna el listado de los grupos (menu arbol, hasta un tercer nivel (Abuelo, Padre e Hijo) ).

Response Json (Status 200)

Success

Url Request (GET)

Menú
https://localhost:3443/api/groups?limit=10&page=1&&code_group_type=menu
Sección
https://localhost:3443/api/groups?limit=20&page=1&code_group_type=seccion&include_products=1

#include_products => (0: no incluye productos, 1: incluye los productos)



Body GET

Response:

                                                

        {
            "result": true,
            "page": 1,
            "limit": 20,
            "total": 5,
            "totalPage": 1,
            "data": {
              "groups": [
                {
                  "id": 188,
                  "id_user": 47,
                  "id_group_type": 2,
                  "name": "diez",
                  "active": 1,
                  "order_section": 2,
                  "createdAt": "2022-08-03T01:21:31.000Z",
                  "updatedAt": "2022-08-09T02:37:14.000Z",
                  "groupType": {
                    "id": 2,
                    "name": "Sección",
                    "code": "SECCION",
                    "active": 1,
                    "createdAt": "2022-08-01T17:47:59.000Z",
                    "updatedAt": "2022-08-01T17:47:59.000Z"
                  },
                  "children": [],
                  "groupProducts": [
                    {
                      "id": 10,                  //identificador de GroupProduct
                      "product_id": "7124",      //identificador de ProductDolibarr
                      "label": "CONVERSOR DE PUERTO ADATA ACAF3PL-ADP-RBK USB-C a USB-A 3.1",
                      "ref": "ID_0000002",
                      "price_list_id": 1,
                      "image_url": [],
                      "original_price": "NaN",
                      "sale_price": "4.26",
                      "sale_price_category_id": "2597",
                      "rotation_type_category_id": "2597",
                      "prices": [
                        {
                          "code": "USD",
                          "original_price": "4.90",
                          "sale_price": "4.26",
                          "sale_price_iva": "4.90",
                          "rate": "1.00",
                          "active": 1,
                          "default": 1
                        },
                        {
                          "code": "BOB",
                          "original_price": "34.10",
                          "sale_price": "29.65",
                          "sale_price_iva": "34.08",
                          "rate": "6.96",
                          "active": 1,
                          "default": 0
                        }
                      ],
                      "net_cost": "4.26",
                      "invoiced_price": "4.90",
                      "virtual_stock": 45,
                      "physical_stock": 45,
                      "utility": 0,
                      "iva": "0.64",
                      "iva_df": "0.64"
                    }
                  ]
                }
              ]
            },
            "message": "Acción realizada con exíto"
          }
                                                
                                            

Notas de implementación

Permite registrar un nuevo group.

Response Json (Status 200)

Success

Url Request (POST)

https://localhost:3443/api/groups/

Body POST

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    }
                                                
                                            

Request:

                                                
    {
        "group": {
            "id_parent": 13,     //debe de llevar null, si ha de ser primer registro
            "name": "abuelo6",
            "active": 1,
            "nivel": 2,
            "font_bold": 1,
            "link": "https://www.google.com",
            "id_group_type": 1,                 //identificador del group type 1=MENU, 2=SECCION
            "id_category_dolibarr": 2464        //identificador de una categoria en dolibarr, puede ser id o array de ids []
        }
    }

    NOTA:
    Se debe tomar en cuenta los criterios para sección
    SECCION
        No estos son los valores por defecto que debe llevar 
        "id_parent": null,
        "nivel": 1,
        id_category_dolibarr": []
                                                
                                            

Response:

                                                
            {
                "result": true,
                "data": {
                    "group": {
                        "createdAt": "2022-08-02T02:58:43.313Z",
                        "updatedAt": "2022-08-02T02:58:43.315Z",
                        "id": 186,
                        "id_parent": null,
                        "name": "ocho",
                        "active": 1,
                        "nivel": 1,
                        "font_bold": 1,
                        "link": "",
                        "id_group_type": 1,
                        "id_user": 47,
                        "children": [],
                        "groupType": {
                            "id": 1,
                            "name": "Menu",
                            "code": "MENU",
                            "active": 1,
                            "createdAt": "2022-08-01T17:46:19.000Z",
                            "updatedAt": "2022-08-01T17:46:19.000Z"
                        }
                    }
                },
                "message": "Acción realizada con exíto"
            }
                                                
                                            

Notas de implementación

Permite actualizar un grop.

Response Json (Status 200)

Success

Url Request (PUT)

https://localhost:3443/api/groups/

Body POST

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    }
                                                
                                            

Request:

                                                
    {
        "group": {
            "id": 15,
            "id_parent": null,
            "name": "abuelo6",
            "active": 1,
            "nivel": 2,
            "font_bold": 1,
            "link": "https://www.google.com",
            "id_category_dolibarr": 2464
        }
    }
                                                
                                            

Response:

                                                
            {
                "result": true,
                "data": {
                    "group": {
                        "createdAt": "2022-04-21T05:36:22.700Z",
                        "updatedAt": "2022-04-21T05:36:22.701Z",
                        "id": 15,
                        "id_parent": 13,
                        "name": "abuelo6",
                        "active": 1,
                        "link": "https://www.google.com",
                        "id_category_dolibarr": "2464",
                        "id_user": 1
                    }
                },
                "message": "Acción realizada con exíto"
            }
                                                
                                            

Notas de implementación

Retorna un grupo menu type (seccion).

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/groups-types/by-code/(seccion || menu)

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    }
                                                
                                            

Body GET

Response:

                                                
        {
            "result": true,
            "data": {
                "groupType": {
                    "id": 2,
                    "name": "Sección",
                    "code": "SECCION",
                    "active": 1,
                    "createdAt": "2022-08-01T17:47:59.000Z",
                    "updatedAt": "2022-08-01T17:47:59.000Z"
                }
            },
            "message": "Acción realizada con exito"
        }
                                                
                                            

Notas de implementación

Retorna un Group Products.

Response Json (Status 200)

Success

Url Request (GET)

https://localhost:3443/api/groups-products?id_group=189&page=1&limit=5

Body GET

Response:

                                                
        {
            "result": true,
            "page": 1,
            "limit": 5,
            "total": 7,
            "totalPage": 2,
            "data": {
                "groupProducts": [
                    {
                        "id": "12",    //identificador de GroupProduct
                        "product_id": "7123",   //identificador de ProductDolibarr
                        "label": "ROUTER DE RED TP-LINK TL-WA901ND 450 Mbps",
                        "ref": "ID_0000001",
                        "price_list_id": 1,
                        "image_url": [],
                        "original_price": "NaN",
                        "sale_price": "30.88",
                        "sale_price_category_id": "2597",
                        "rotation_type_category_id": "2597",
                        "prices": [
                            {
                                "code": "USD",
                                "original_price": "35.50",
                                "sale_price": "30.88",
                                "sale_price_iva": "35.49",
                                "rate": "1.00",
                                "active": 1,
                                "default": 1
                            },
                            {
                                "code": "BOB",
                                "original_price": "247.08",
                                "sale_price": "214.92",
                                "sale_price_iva": "247.03",
                                "rate": "6.96",
                                "active": 1,
                                "default": 0
                            }
                        ],
                        "net_cost": "30.88",
                        "invoiced_price": "35.49",
                        "virtual_stock": 1,
                        "physical_stock": 1,
                        "utility": 0,
                        "iva": "4.62",
                        "iva_df": "4.61",
                        "group": [
                            {
                                "id": 188,
                                "id_user": 47,
                                "id_group_type": 2,
                                "name": "diez",
                                "active": 1,
                                "order_section": 1,
                                "createdAt": "2022-08-03T01:21:31.000Z",
                                "updatedAt": "2022-08-03T01:21:31.000Z"
                            },
                            {
                                "id": 189,
                                "id_user": 47,
                                "id_group_type": 2,
                                "name": "once",
                                "active": 1,
                                "order_section": 2,
                                "createdAt": "2022-08-03T01:21:53.000Z",
                                "updatedAt": "2022-08-03T01:21:53.000Z"
                            }
                        ]
                    },
                ]
            },
            "message": "Acción realizada con exíto"
        }
                                                
                                            

Notas de implementación

Permite registrar un nuevo GroupProduct.

Response Json (Status 200)

Success

Url Request (POST)

https://localhost:3443/api/groups-products

Body POST

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    }
                                                
                                            

Request:

                                                
    {
        "groupProduct": {
            "id_group": 189,
            "id_product_dolibarr": 7124
        }
    }
                                                
                                            

Response:

                                                
    {
        "result": true,
        "data": {
            "groupProduct": {
                "createdAt": "2022-08-08T03:44:33.861Z",
                "updatedAt": "2022-08-08T03:44:33.861Z",
                "id": 12,
                "id_group": 189,
                "id_product_dolibarr": 7124,
                "ref": "ID_0000002",
                "id_user": 47,
                "group": {
                    "id": 189,
                    "id_user": 47,
                    "id_parent": null,
                    "id_category_dolibarr": null,
                    "id_group_type": 2,
                    "name": "once",
                    "link": "",
                    "active": 1,
                    "nivel": 1,
                    "font_bold": 1,
                    "order_section": 2,
                    "createdAt": "2022-08-03T01:21:53.000Z",
                    "updatedAt": "2022-08-03T01:21:53.000Z"
                }
            }
        },
        "message": "Acción realizada con exíto"
    }
                                                
                                            

Notas de implementación

Permite actualizar un GroupProduct.

Response Json (Status 200)

Success

Url Request (PUT)

https://localhost:3443/api/groups-products/

Body PUT

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    }
                                                
                                            

Request:

                                                
    {
        "groupProduct": {
            "id": 11,
            "id_group": 187,
            "id_product_dolibarr": 7126,
            "order": 4
        }
    }
                                                
                                            

Response:

                                                
    {
        "result": true,
        "data": {
            "groupProduct": {
                "id": 11,
                "id_user": 47,
                "id_group": 187,
                "id_product_dolibarr": 7126,
                "ref": "ID_0000004",
                "createdAt": "2022-08-05T01:55:20.000Z",
                "updatedAt": "2022-08-08T03:54:02.746Z",
                "group": {
                    "id": 187,
                    "id_user": 47,
                    "id_parent": null,
                    "id_category_dolibarr": null,
                    "id_group_type": 2,
                    "name": "nueve12",
                    "link": "",
                    "active": 1,
                    "nivel": 1,
                    "font_bold": 1,
                    "order_section": null,
                    "createdAt": "2022-08-02T03:14:34.000Z",
                    "updatedAt": "2022-08-02T03:18:33.000Z"
                }
            }
        },
        "message": "Acción realizada con exíto"
    }
                                                
                                            

Notas de implementación

Permite eliminar GroupProduct.

Response Json (Status 200)

Success

Url Request (DELETE)

https://localhost:3443/api/groups-products/7 (id)

Body DELETE

Condición: Token Autrorization (401 Unauthorized), data (JSON)

                                                
    "headers": {
        "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVC...",
        "Content-Type": "application/json"
    }
                                                
                                            

Response:

                                                
    {
        "result": true,
        "data": {
            "group": {
                "id": 7,
                "id_user": 47,
                "id_group": 189,
                "id_product_dolibarr": 7123,
                "ref": "ID_0000001",
                "createdAt": "2022-08-05T01:28:49.000Z",
                "updatedAt": "2022-08-05T01:28:49.000Z"
            }
        },
        "message": "Acción realizada con exíto"
    }