Productos

Es la entidad que almacena la información básica y descriptiva del producto como: nombre, descripción, marca, modelo, atributos, etc.

Cada producto contiene 1 variante master (se genera automáticamente al crear un producto), y opcionalmente, otras variantes dependiendo de su configuración. Por ejemplo: una camiseta (producto) puede tener múltiples tallas (variantes), y cada variante puede tener un precio específico, aunque pertenezcan al mismo producto.

La(s) variante(s) almacenan la información relacionada a precios e inventario. Por lo tanto, es importante guardar el ID de la variante master cuando se crea un producto, ya que las modificaciones posteriores de inventario y precio deben hacerse a través del objeto variantes (no el de productos).

Obtener productos

GET https://tiendagoshop.com/api/v1/products

Este endpoint permite obtener un listado de todos los productos.

Query Parameters

Headers

{
    "products": [
        {
            "id": 48,
            "name": "PISCINA BESTWAY RIGIDA",
            "description": "<p>PISCINA BESTWAY RIGIDA 8 X 26</p>",
            "price": "123000.0",
            "display_price": "RD$ 123,000.00",
            "available_on": "2021-08-12T00:00:00.000-04:00",
            "slug": "piscina-bestway-rigida",
            "meta_description": null,
            "meta_keywords": null,
            "shipping_category_id": 1,
            "taxon_ids": [
                2
            ],
            "total_on_hand": "200.0",
            "avg_rating": "3.0",
            "reviews_count": 1,
            "master": {
                "id": 72,
                "name": "PISCINA BESTWAY RIGIDA",
                "sku": "PISCINA BESTWAY RIGIDA",
                "price": "123000.0",
                "weight": "0.0",
                "height": null,
                "width": null,
                "depth": null,
                "is_master": true,
                "slug": "piscina-bestway-rigida",
                "description": "<p>PISCINA BESTWAY RIGIDA 8 X 26</p>",
                "track_inventory": true,
                "cost_price": "123000.0",
                "gd_size_reference": "document",
                "decimal_quantity_step": "1.0",
                "option_values": [],
                "images": [
                    {
                        "id": 140,
                        "position": 1,
                        "attachment_content_type": null,
                        "attachment_file_name": null,
                        "type": null,
                        "attachment_updated_at": null,
                        "attachment_width": null,
                        "attachment_height": null,
                        "alt": null,
                        "viewable_type": "Spree::Variant",
                        "viewable_id": 72,
                        "mini_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBYWs9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--8cd1a09652d602afcb0e740a8013c7e44205bcf2/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lMTkRoNE5EZytCam9HUlZRPSIsImV4cCI6bnVsbCwicHVyIjoidmFyaWF0aW9uIn19--cb0f2b531c62670bf1c5e0d1c489e2b7c650b66c/1.jpg",
                        "small_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBYWs9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--8cd1a09652d602afcb0e740a8013c7e44205bcf2/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTVRBd2VERXdNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--361864c475f0f86c6a8176add86144902e2b8754/1.jpg",
                        "product_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBYWs9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--8cd1a09652d602afcb0e740a8013c7e44205bcf2/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTWpRd2VESTBNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--f1f1c60e226e6a85eb40a730ec4e71226c47c829/1.jpg",
                        "large_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBYWs9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--8cd1a09652d602afcb0e740a8013c7e44205bcf2/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTmpBd2VEWXdNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--199a7b8adb909ca2106c9aed6b140a2603b4dc82/1.jpg"
                    }
                ],
                "display_price": "RD$ 123,000.00",
                "options_text": "",
                "in_stock": true,
                "is_backorderable": false,
                "is_orderable": true,
                "total_on_hand": "200.0",
                "is_destroyed": false
            },
            "variants": [],
            "option_types": [
                {
                    "id": 5,
                    "name": "Color",
                    "presentation": "Color",
                    "position": 2
                }
            ],
            "product_properties": [],
            "classifications": [
                {
                    "taxon_id": 2,
                    "position": 12,
                    "taxon": {
                        "id": 2,
                        "name": "Ofertas",
                        "pretty_name": "Categorias -> Ofertas",
                        "permalink": "categorias/ofertas",
                        "parent_id": 1,
                        "taxonomy_id": 1,
                        "meta_title": null,
                        "meta_description": null,
                        "ext_id": null,
                        "ext_name": null,
                        "taxons": [
                            {
                                "id": 45,
                                "name": "Guitarra",
                                "pretty_name": "Categorias -> Ofertas -> Guitarra",
                                "permalink": "categorias/ofertas/guitarra",
                                "parent_id": 2,
                                "taxonomy_id": 1,
                                "meta_title": null,
                                "meta_description": null
                            },
                            {
                                "id": 37,
                                "name": "Violin",
                                "pretty_name": "Categorias -> Ofertas -> Violin",
                                "permalink": "categorias/ofertas/violin",
                                "parent_id": 2,
                                "taxonomy_id": 1,
                                "meta_title": null,
                                "meta_description": null
                            },
                            {
                                "id": 11,
                                "name": "Pianos",
                                "pretty_name": "Categorias -> Ofertas -> Pianos",
                                "permalink": "categorias/ofertas/pianos",
                                "parent_id": 2,
                                "taxonomy_id": 1,
                                "meta_title": null,
                                "meta_description": null
                            },
                            {
                                "id": 42,
                                "name": "bateria",
                                "pretty_name": "Categorias -> Ofertas -> bateria",
                                "permalink": "categorias/ofertas/bateria",
                                "parent_id": 2,
                                "taxonomy_id": 1,
                                "meta_title": null,
                                "meta_description": null
                            }
                        ]
                    }
                }
            ],
            "related_products": [],
            "has_variants": false
        },
        {
            "id": 49,
            "name": "Luz de led tipo plafón redonda de superficie ",
            "description": "",
            "price": "505.0",
            "display_price": "RD$ 505.00",
            "available_on": "2021-08-12T00:00:00.000-04:00",
            "slug": "luz-de-led-tipo-plafon-redonda-de-superficie",
            "meta_description": null,
            "meta_keywords": null,
            "shipping_category_id": 1,
            "taxon_ids": [
                2
            ],
            "total_on_hand": "1100.0",
            "avg_rating": "0.0",
            "reviews_count": 0,
            "master": {
                "id": 73,
                "name": "Luz de led tipo plafón redonda de superficie ",
                "sku": "Luz de led tipo plafón redonda de superficie ",
                "price": "505.0",
                "weight": "0.0",
                "height": null,
                "width": null,
                "depth": null,
                "is_master": true,
                "slug": "luz-de-led-tipo-plafon-redonda-de-superficie",
                "description": "",
                "track_inventory": true,
                "cost_price": null,
                "gd_size_reference": "",
                "decimal_quantity_step": "1.0",
                "option_values": [],
                "images": [
                    {
                        "id": 141,
                        "position": 1,
                        "attachment_content_type": null,
                        "attachment_file_name": null,
                        "type": null,
                        "attachment_updated_at": null,
                        "attachment_width": null,
                        "attachment_height": null,
                        "alt": null,
                        "viewable_type": "Spree::Variant",
                        "viewable_id": 73,
                        "mini_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBYW89IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--e74173f36eab81fb4f727bea30589c99b7f823cc/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lMTkRoNE5EZytCam9HUlZRPSIsImV4cCI6bnVsbCwicHVyIjoidmFyaWF0aW9uIn19--cb0f2b531c62670bf1c5e0d1c489e2b7c650b66c/2.jpg",
                        "small_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBYW89IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--e74173f36eab81fb4f727bea30589c99b7f823cc/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTVRBd2VERXdNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--361864c475f0f86c6a8176add86144902e2b8754/2.jpg",
                        "product_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBYW89IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--e74173f36eab81fb4f727bea30589c99b7f823cc/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTWpRd2VESTBNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--f1f1c60e226e6a85eb40a730ec4e71226c47c829/2.jpg",
                        "large_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBYW89IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--e74173f36eab81fb4f727bea30589c99b7f823cc/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTmpBd2VEWXdNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--199a7b8adb909ca2106c9aed6b140a2603b4dc82/2.jpg"
                    }
                ],
                "display_price": "RD$ 505.00",
                "options_text": "",
                "in_stock": true,
                "is_backorderable": false,
                "is_orderable": true,
                "total_on_hand": "1100.0",
                "is_destroyed": false
            },
            "variants": [],
            "option_types": [
                {
                    "id": 6,
                    "name": "Tamaño",
                    "presentation": "Tamaño",
                    "position": 3
                }
            ],
            "product_properties": [],
            "classifications": [
                {
                    "taxon_id": 2,
                    "position": 13,
                    "taxon": {
                        "id": 2,
                        "name": "Ofertas",
                        "pretty_name": "Categorias -> Ofertas",
                        "permalink": "categorias/ofertas",
                        "parent_id": 1,
                        "taxonomy_id": 1,
                        "meta_title": null,
                        "meta_description": null,
                        "ext_id": null,
                        "ext_name": null,
                        "taxons": [
                            {
                                "id": 45,
                                "name": "Guitarra",
                                "pretty_name": "Categorias -> Ofertas -> Guitarra",
                                "permalink": "categorias/ofertas/guitarra",
                                "parent_id": 2,
                                "taxonomy_id": 1,
                                "meta_title": null,
                                "meta_description": null
                            },
                            {
                                "id": 37,
                                "name": "Violin",
                                "pretty_name": "Categorias -> Ofertas -> Violin",
                                "permalink": "categorias/ofertas/violin",
                                "parent_id": 2,
                                "taxonomy_id": 1,
                                "meta_title": null,
                                "meta_description": null
                            },
                            {
                                "id": 11,
                                "name": "Pianos",
                                "pretty_name": "Categorias -> Ofertas -> Pianos",
                                "permalink": "categorias/ofertas/pianos",
                                "parent_id": 2,
                                "taxonomy_id": 1,
                                "meta_title": null,
                                "meta_description": null
                            },
                            {
                                "id": 42,
                                "name": "bateria",
                                "pretty_name": "Categorias -> Ofertas -> bateria",
                                "permalink": "categorias/ofertas/bateria",
                                "parent_id": 2,
                                "taxonomy_id": 1,
                                "meta_title": null,
                                "meta_description": null
                            }
                        ]
                    }
                }
            ],
            "related_products": [],
            "has_variants": false
        },
        {
            "id": 57,
            "name": " Abrazadera para manguera en acero inoxidable ",
            "description": "",
            "price": "73.72",
            "display_price": "RD$ 73.72",
            "available_on": "2021-08-12T00:00:00.000-04:00",
            "slug": "abrazadera-para-manguera-en-acero-inoxidable",
            "meta_description": null,
            "meta_keywords": null,
            "shipping_category_id": 1,
            "taxon_ids": [
                2
            ],
            "total_on_hand": "999.0",
            "avg_rating": "0.0",
            "reviews_count": 0,
            "master": {
                "id": 81,
                "name": " Abrazadera para manguera en acero inoxidable ",
                "sku": "PT510",
                "price": "73.72",
                "weight": "0.0",
                "height": null,
                "width": null,
                "depth": null,
                "is_master": true,
                "slug": "abrazadera-para-manguera-en-acero-inoxidable",
                "description": "",
                "track_inventory": true,
                "cost_price": "74.0",
                "gd_size_reference": "",
                "decimal_quantity_step": "1.0",
                "option_values": [],
                "images": [
                    {
                        "id": 149,
                        "position": 1,
                        "attachment_content_type": null,
                        "attachment_file_name": null,
                        "type": null,
                        "attachment_updated_at": null,
                        "attachment_width": null,
                        "attachment_height": null,
                        "alt": null,
                        "viewable_type": "Spree::Variant",
                        "viewable_id": 81,
                        "mini_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBYkk9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--c1fbb7f734a367a316111653e839ab67de91ee1a/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lMTkRoNE5EZytCam9HUlZRPSIsImV4cCI6bnVsbCwicHVyIjoidmFyaWF0aW9uIn19--cb0f2b531c62670bf1c5e0d1c489e2b7c650b66c/10.jpg",
                        "small_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBYkk9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--c1fbb7f734a367a316111653e839ab67de91ee1a/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTVRBd2VERXdNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--361864c475f0f86c6a8176add86144902e2b8754/10.jpg",
                        "product_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBYkk9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--c1fbb7f734a367a316111653e839ab67de91ee1a/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTWpRd2VESTBNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--f1f1c60e226e6a85eb40a730ec4e71226c47c829/10.jpg",
                        "large_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBYkk9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--c1fbb7f734a367a316111653e839ab67de91ee1a/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTmpBd2VEWXdNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--199a7b8adb909ca2106c9aed6b140a2603b4dc82/10.jpg"
                    }
                ],
                "display_price": "RD$ 73.72",
                "options_text": "",
                "in_stock": true,
                "is_backorderable": false,
                "is_orderable": true,
                "total_on_hand": "999.0",
                "is_destroyed": false
            },
            "variants": [],
            "option_types": [
                {
                    "id": 6,
                    "name": "Tamaño",
                    "presentation": "Tamaño",
                    "position": 3
                }
            ],
            "product_properties": [],
            "classifications": [
                {
                    "taxon_id": 2,
                    "position": 21,
                    "taxon": {
                        "id": 2,
                        "name": "Ofertas",
                        "pretty_name": "Categorias -> Ofertas",
                        "permalink": "categorias/ofertas",
                        "parent_id": 1,
                        "taxonomy_id": 1,
                        "meta_title": null,
                        "meta_description": null,
                        "ext_id": null,
                        "ext_name": null,
                        "taxons": [
                            {
                                "id": 45,
                                "name": "Guitarra",
                                "pretty_name": "Categorias -> Ofertas -> Guitarra",
                                "permalink": "categorias/ofertas/guitarra",
                                "parent_id": 2,
                                "taxonomy_id": 1,
                                "meta_title": null,
                                "meta_description": null
                            },
                            {
                                "id": 37,
                                "name": "Violin",
                                "pretty_name": "Categorias -> Ofertas -> Violin",
                                "permalink": "categorias/ofertas/violin",
                                "parent_id": 2,
                                "taxonomy_id": 1,
                                "meta_title": null,
                                "meta_description": null
                            },
                            {
                                "id": 11,
                                "name": "Pianos",
                                "pretty_name": "Categorias -> Ofertas -> Pianos",
                                "permalink": "categorias/ofertas/pianos",
                                "parent_id": 2,
                                "taxonomy_id": 1,
                                "meta_title": null,
                                "meta_description": null
                            },
                            {
                                "id": 42,
                                "name": "bateria",
                                "pretty_name": "Categorias -> Ofertas -> bateria",
                                "permalink": "categorias/ofertas/bateria",
                                "parent_id": 2,
                                "taxonomy_id": 1,
                                "meta_title": null,
                                "meta_description": null
                            }
                        ]
                    }
                }
            ],
            "related_products": [],
            "has_variants": false
        },
        {
            "id": 21,
            "name": "Hidrolavadora eléctrica de 1800 psi ",
            "description": "",
            "price": "350.0",
            "display_price": "RD$ 350.00",
            "available_on": "2021-07-22T00:00:00.000-04:00",
            "slug": "hidrolavadora-electrica-de-1800-psi",
            "meta_description": null,
            "meta_keywords": null,
            "shipping_category_id": 1,
            "taxon_ids": [
                3
            ],
            "total_on_hand": 0,
            "avg_rating": "3.0",
            "reviews_count": 1,
            "master": {
                "id": 38,
                "name": "Hidrolavadora eléctrica de 1800 psi ",
                "sku": "",
                "price": "350.0",
                "weight": "0.0",
                "height": null,
                "width": null,
                "depth": null,
                "is_master": true,
                "slug": "hidrolavadora-electrica-de-1800-psi",
                "description": "",
                "track_inventory": true,
                "cost_price": "400.0",
                "gd_size_reference": "medium",
                "decimal_quantity_step": "1.0",
                "option_values": [],
                "images": [
                    {
                        "id": 111,
                        "position": 1,
                        "attachment_content_type": null,
                        "attachment_file_name": null,
                        "type": null,
                        "attachment_updated_at": null,
                        "attachment_width": null,
                        "attachment_height": null,
                        "alt": null,
                        "viewable_type": "Spree::Variant",
                        "viewable_id": 38,
                        "mini_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBWHM9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--2fd3d0ea8a37702f0a47e3ed6afa8f114ba714f2/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lMTkRoNE5EZytCam9HUlZRPSIsImV4cCI6bnVsbCwicHVyIjoidmFyaWF0aW9uIn19--cb0f2b531c62670bf1c5e0d1c489e2b7c650b66c/3.jpg",
                        "small_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBWHM9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--2fd3d0ea8a37702f0a47e3ed6afa8f114ba714f2/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTVRBd2VERXdNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--361864c475f0f86c6a8176add86144902e2b8754/3.jpg",
                        "product_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBWHM9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--2fd3d0ea8a37702f0a47e3ed6afa8f114ba714f2/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTWpRd2VESTBNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--f1f1c60e226e6a85eb40a730ec4e71226c47c829/3.jpg",
                        "large_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBWHM9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--2fd3d0ea8a37702f0a47e3ed6afa8f114ba714f2/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTmpBd2VEWXdNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--199a7b8adb909ca2106c9aed6b140a2603b4dc82/3.jpg"
                    },
                    {
                        "id": 112,
                        "position": 1,
                        "attachment_content_type": null,
                        "attachment_file_name": null,
                        "type": null,
                        "attachment_updated_at": null,
                        "attachment_width": null,
                        "attachment_height": null,
                        "alt": null,
                        "viewable_type": "Spree::Variant",
                        "viewable_id": 38,
                        "mini_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBmdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--e1f2fb9986eddd4e681365a3eab1870ab5f61bdb/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lMTkRoNE5EZytCam9HUlZRPSIsImV4cCI6bnVsbCwicHVyIjoidmFyaWF0aW9uIn19--cb0f2b531c62670bf1c5e0d1c489e2b7c650b66c/4.jpg",
                        "small_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBmdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--e1f2fb9986eddd4e681365a3eab1870ab5f61bdb/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTVRBd2VERXdNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--361864c475f0f86c6a8176add86144902e2b8754/4.jpg",
                        "product_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBmdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--e1f2fb9986eddd4e681365a3eab1870ab5f61bdb/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTWpRd2VESTBNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--f1f1c60e226e6a85eb40a730ec4e71226c47c829/4.jpg",
                        "large_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBmdz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--e1f2fb9986eddd4e681365a3eab1870ab5f61bdb/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTmpBd2VEWXdNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--199a7b8adb909ca2106c9aed6b140a2603b4dc82/4.jpg"
                    },
                    {
                        "id": 113,
                        "position": 2,
                        "attachment_content_type": null,
                        "attachment_file_name": null,
                        "type": null,
                        "attachment_updated_at": null,
                        "attachment_width": null,
                        "attachment_height": null,
                        "alt": null,
                        "viewable_type": "Spree::Variant",
                        "viewable_id": 38,
                        "mini_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBWHc9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--c2c6034fdac0008433e6c76116f9709191e339fb/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lMTkRoNE5EZytCam9HUlZRPSIsImV4cCI6bnVsbCwicHVyIjoidmFyaWF0aW9uIn19--cb0f2b531c62670bf1c5e0d1c489e2b7c650b66c/2.jpg",
                        "small_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBWHc9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--c2c6034fdac0008433e6c76116f9709191e339fb/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTVRBd2VERXdNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--361864c475f0f86c6a8176add86144902e2b8754/2.jpg",
                        "product_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBWHc9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--c2c6034fdac0008433e6c76116f9709191e339fb/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTWpRd2VESTBNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--f1f1c60e226e6a85eb40a730ec4e71226c47c829/2.jpg",
                        "large_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBWHc9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--c2c6034fdac0008433e6c76116f9709191e339fb/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTmpBd2VEWXdNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--199a7b8adb909ca2106c9aed6b140a2603b4dc82/2.jpg"
                    },
                    {
                        "id": 114,
                        "position": 3,
                        "attachment_content_type": null,
                        "attachment_file_name": null,
                        "type": null,
                        "attachment_updated_at": null,
                        "attachment_width": null,
                        "attachment_height": null,
                        "alt": null,
                        "viewable_type": "Spree::Variant",
                        "viewable_id": 38,
                        "mini_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBWDA9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--f296e0b5c57ccc1263771a08c514d15ae1ed804a/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lMTkRoNE5EZytCam9HUlZRPSIsImV4cCI6bnVsbCwicHVyIjoidmFyaWF0aW9uIn19--cb0f2b531c62670bf1c5e0d1c489e2b7c650b66c/1.jpg",
                        "small_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBWDA9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--f296e0b5c57ccc1263771a08c514d15ae1ed804a/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTVRBd2VERXdNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--361864c475f0f86c6a8176add86144902e2b8754/1.jpg",
                        "product_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBWDA9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--f296e0b5c57ccc1263771a08c514d15ae1ed804a/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTWpRd2VESTBNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--f1f1c60e226e6a85eb40a730ec4e71226c47c829/1.jpg",
                        "large_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBWDA9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--f296e0b5c57ccc1263771a08c514d15ae1ed804a/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTmpBd2VEWXdNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--199a7b8adb909ca2106c9aed6b140a2603b4dc82/1.jpg"
                    }
                ],
                "display_price": "RD$ 350.00",
                "options_text": "",
                "in_stock": false,
                "is_backorderable": false,
                "is_orderable": false,
                "total_on_hand": "0.0",
                "is_destroyed": false
            },
            "variants": [],
            "option_types": [],
            "product_properties": [],
            "classifications": [
                {
                    "taxon_id": 3,
                    "position": 14,
                    "taxon": {
                        "id": 3,
                        "name": "Guitarras/Bajos",
                        "pretty_name": "Categorias -> Guitarras/Bajos",
                        "permalink": "categorias/guitarras-slash-bajos",
                        "parent_id": 1,
                        "taxonomy_id": 1,
                        "meta_title": null,
                        "meta_description": null,
                        "ext_id": null,
                        "ext_name": null,
                        "taxons": []
                    }
                }
            ],
            "related_products": [],
            "has_variants": false
        }
       
    ],
    "count": 4,
    "total_count": 4,
    "current_page": 1,
    "per_page": 25,
    "pages": 1
}

Obtener producto

GET https://tiendagoshop.com/api/v1/products/:id

Este endpoint permite obtener un producto en específico.

Path Parameters

Headers

{
    "id": 48,
    "name": "PISCINA BESTWAY RIGIDA",
    "description": "<p>PISCINA BESTWAY RIGIDA 8 X 26</p>",
    "price": "123000.0",
    "display_price": "RD$ 123,000.00",
    "available_on": "2021-08-12T00:00:00.000-04:00",
    "slug": "piscina-bestway-rigida",
    "meta_description": null,
    "meta_keywords": null,
    "shipping_category_id": 1,
    "taxon_ids": [
        2
    ],
    "total_on_hand": "200.0",
    "avg_rating": "3.0",
    "reviews_count": 1,
    "master": {
        "id": 72,
        "name": "PISCINA BESTWAY RIGIDA",
        "sku": "PISCINA BESTWAY RIGIDA",
        "price": "123000.0",
        "weight": "0.0",
        "height": null,
        "width": null,
        "depth": null,
        "is_master": true,
        "slug": "piscina-bestway-rigida",
        "description": "<p>PISCINA BESTWAY RIGIDA 8 X 26</p>",
        "track_inventory": true,
        "cost_price": "123000.0",
        "gd_size_reference": "document",
        "decimal_quantity_step": "1.0",
        "option_values": [],
        "images": [
            {
                "id": 140,
                "position": 1,
                "attachment_content_type": null,
                "attachment_file_name": null,
                "type": null,
                "attachment_updated_at": null,
                "attachment_width": null,
                "attachment_height": null,
                "alt": null,
                "viewable_type": "Spree::Variant",
                "viewable_id": 72,
                "mini_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBYWs9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--8cd1a09652d602afcb0e740a8013c7e44205bcf2/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lMTkRoNE5EZytCam9HUlZRPSIsImV4cCI6bnVsbCwicHVyIjoidmFyaWF0aW9uIn19--cb0f2b531c62670bf1c5e0d1c489e2b7c650b66c/1.jpg",
                "small_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBYWs9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--8cd1a09652d602afcb0e740a8013c7e44205bcf2/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTVRBd2VERXdNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--361864c475f0f86c6a8176add86144902e2b8754/1.jpg",
                "product_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBYWs9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--8cd1a09652d602afcb0e740a8013c7e44205bcf2/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTWpRd2VESTBNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--f1f1c60e226e6a85eb40a730ec4e71226c47c829/1.jpg",
                "large_url": "http://fego.goshop.test:5000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBBYWs9IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--8cd1a09652d602afcb0e740a8013c7e44205bcf2/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lOTmpBd2VEWXdNRDRHT2daRlZBPT0iLCJleHAiOm51bGwsInB1ciI6InZhcmlhdGlvbiJ9fQ==--199a7b8adb909ca2106c9aed6b140a2603b4dc82/1.jpg"
            }
        ],
        "display_price": "RD$ 123,000.00",
        "options_text": "",
        "in_stock": true,
        "is_backorderable": false,
        "is_orderable": true,
        "total_on_hand": "200.0",
        "is_destroyed": false
    },
    "variants": [],
    "option_types": [
        {
            "id": 5,
            "name": "Color",
            "presentation": "Color",
            "position": 2
        }
    ],
    "product_properties": [],
    "classifications": [
        {
            "taxon_id": 2,
            "position": 12,
            "taxon": {
                "id": 2,
                "name": "Ofertas",
                "pretty_name": "Categorias -> Ofertas",
                "permalink": "categorias/ofertas",
                "parent_id": 1,
                "taxonomy_id": 1,
                "meta_title": null,
                "meta_description": null,
                "ext_id": null,
                "ext_name": null,
                "taxons": [
                    {
                        "id": 45,
                        "name": "Guitarra",
                        "pretty_name": "Categorias -> Ofertas -> Guitarra",
                        "permalink": "categorias/ofertas/guitarra",
                        "parent_id": 2,
                        "taxonomy_id": 1,
                        "meta_title": null,
                        "meta_description": null
                    },
                    {
                        "id": 37,
                        "name": "Violin",
                        "pretty_name": "Categorias -> Ofertas -> Violin",
                        "permalink": "categorias/ofertas/violin",
                        "parent_id": 2,
                        "taxonomy_id": 1,
                        "meta_title": null,
                        "meta_description": null
                    },
                    {
                        "id": 11,
                        "name": "Pianos",
                        "pretty_name": "Categorias -> Ofertas -> Pianos",
                        "permalink": "categorias/ofertas/pianos",
                        "parent_id": 2,
                        "taxonomy_id": 1,
                        "meta_title": null,
                        "meta_description": null
                    },
                    {
                        "id": 42,
                        "name": "bateria",
                        "pretty_name": "Categorias -> Ofertas -> bateria",
                        "permalink": "categorias/ofertas/bateria",
                        "parent_id": 2,
                        "taxonomy_id": 1,
                        "meta_title": null,
                        "meta_description": null
                    }
                ]
            }
        }
    ],
    "related_products": [],
    "has_variants": false
}

Crear producto

POST https://tiendagoshop.com/api/v1/products

Este endpoint permite crear un producto.

Headers

Request Body

// Request 
{
  "product":{
    "id": 11505,
    "name": "Pantal11ón Slim Fit",
    "description": null,
    "price": "499.99",
    "gd_size_reference" : "document",
    "display_price": "RD$ 499.99",
    "available_on": "2021-08-16T11:46:05.387-04:00",
    "slug": "testr6l",
    "meta_description": null,
    "meta_keywords": null,
    "shipping_category_id": 1,
    "taxon_ids": [],
    "total_on_hand": "10.0",
    "avg_rating": "0.0",
    "reviews_count": 0,
    "master": {
        "id": 83,
        "name": "Pantal11ón Slim Fit",
        "sku": "13a",
        "price": "499.99",
        "weight": "0.0",
        "height": null,
        "width": null,
        "depth": null,
        "is_master": true,
        "slug": "testr6",
        "description": null,
        "track_inventory": true,
        "cost_price": null,
        "gd_size_reference": "document",
        "decimal_quantity_step": "1.0",
        "option_values": [],
        "images": [],
        "display_price": "RD$ 499.99",
        "options_text": "",
        "in_stock": true,
        "is_backorderable": false,
        "is_orderable": true,
        "total_on_hand": "10.0",
        "is_destroyed": false
    },
    "variants": [

       { "stock_items_attributes": 99,
        "price":450.00}
    ],
    "product_properties": [],
    "classifications": [],
    "related_products": [],
    "has_variants": true
  }
}
// Respuesta 
{
    "id": 481,
    "name": "Pantal11ón Slim Fit",
    "description": null,
    "price": "499.99",
    "display_price": "RD$ 499.99",
    "available_on": "2021-08-16T11:46:05.387-04:00",
    "slug": "testr6l",
    "meta_description": null,
    "meta_keywords": null,
    "shipping_category_id": 1,
    "taxon_ids": [],
    "total_on_hand": "0.0",
    "avg_rating": "0.0",
    "reviews_count": 0,
    "master": {
        "id": 583,
        "name": "Pantal11ón Slim Fit",
        "sku": "",
        "price": "499.99",
        "weight": "0.0",
        "height": null,
        "width": null,
        "depth": null,
        "is_master": true,
        "slug": "testr6l",
        "description": null,
        "track_inventory": true,
        "cost_price": null,
        "gd_size_reference": "document",
        "decimal_quantity_step": "1.0",
        "option_values": [],
        "images": [],
        "display_price": "RD$ 499.99",
        "options_text": "",
        "in_stock": false,
        "is_backorderable": true,
        "is_orderable": true,
        "total_on_hand": "0.0",
        "is_destroyed": false
    },
    "variants": [
        {
            "id": 584,
            "name": "Pantal11ón Slim Fit",
            "sku": "",
            "price": "450.0",
            "weight": "0.0",
            "height": null,
            "width": null,
            "depth": null,
            "is_master": false,
            "slug": "testr6l",
            "description": null,
            "track_inventory": true,
            "cost_price": null,
            "gd_size_reference": null,
            "decimal_quantity_step": "1.0",
            "option_values": [],
            "images": [],
            "display_price": "RD$ 450.00",
            "options_text": "",
            "in_stock": false,
            "is_backorderable": true,
            "is_orderable": true,
            "total_on_hand": "0.0",
            "is_destroyed": false
        }
    ],
    "option_types": [],
    "product_properties": [],
    "classifications": [],
    "related_products": [],
    "has_variants": true
}

fixed_stock se encuentra obsoleto, favor utilizar stock_items_attributes

Modificar producto

PUT https://tiendagoshop.com/api/v1/products/:id

Este endpoint permite modificar un producto.

Path Parameters

Headers

Request Body

{
    "id": 59,
    "name": "Pantal11ón Slim Fit",
    "description": null,
    "price": "499.99",
    "display_price": "RD$ 499.99",
    "available_on": "2021-08-16T11:46:05.387-04:00",
    "slug": "pantal11on-slim-fit",
    "meta_description": null,
    "meta_keywords": null,
    "shipping_category_id": 1,
    "taxon_ids": [],
    "total_on_hand": "10.0",
    "avg_rating": "0.0",
    "reviews_count": 0,
    "master": {
        "id": 83,
        "name": "Pantal11ón Slim Fit",
        "sku": "111112a",
        "price": "499.99",
        "weight": "0.0",
        "height": null,
        "width": null,
        "depth": null,
        "is_master": true,
        "slug": "pantal11on-slim-fit",
        "description": null,
        "track_inventory": true,
        "cost_price": null,
        "gd_size_reference": "document",
        "decimal_quantity_step": "1.0",
        "option_values": [],
        "images": [],
        "display_price": "RD$ 499.99",
        "options_text": "",
        "in_stock": true,
        "is_backorderable": false,
        "is_orderable": true,
        "total_on_hand": "10.0",
        "is_destroyed": false
    },
    "variants": [],
    "option_types": [
        {
            "id": 10,
            "name": "esss",
            "presentation": "esss",
            "position": 7
        },
        {
            "id": 11,
            "name": "essssa",
            "presentation": "essssa",
            "position": 8
        }
    ],
    "product_properties": [],
    "classifications": [],
    "related_products": [],
    "has_variants": false
}

Ten cuidado al modificar un producto y utilizar stock_items_attributes, ya que si el producto tiene 2 ó más variantes estarás actualizando el stock de todas las variantes relacionadas al producto con la misma cantidad. Para actualizar una variante en particular favor utilizar actualizar variantes

Eliminar producto

DELETE https://tiendagoshop.com/api/v1/products/:id

Este endpoint permite eliminar un producto específico.

Path Parameters

Headers

Última actualización