Obtener las Variaciones de un Producto de una Tienda

GET https://api.software.madkting.com/shops/(shop_pk)/products/(product_pk)/variations/
Parameters:
  • shop_pk – El id de la tienda en la que pertenece el producto.
  • product_pk – Id del producto del que se quiere obtener los detalles de la variación

Objeto de respuesta Variación

Status Codes:

Ejemplo de petición

GET https://api.software.madkting.com/shops/2/products/123/variations/ HTTP/1.1
Accept: application/json
Authorization: Token 54f2d8bcfc49e7821da31a83ab95e40213c0a5c1

Ejemplo de respuesta

HTTP/1.1 200 OK
Vary: Accept
Content-Type: application/json
Allow: GET, PUT, POST, DELETE, OPTIONS
[
    {
        "availability": false,
        "color": "negro",
        "created_at": "2016-10-12T21:52:01",
        "deleted_at": null,
        "discount": 0.0,
        "discount_from": null,
        "discount_to": null,
        "images": [
            {
                "pk": 272,
                "position": 0,
                "url": "https://software.madkting.com/gallery/97/products/99323160-2f35-4652-9625-ca0556cafb42.jpg"
            }
        ],
        "is_default": true,
        "pk": 1569,
        "price": 390.0,
        "secondary_color": "False",
        "size": "s",
        "sku": "16_1",
        "stock": 6,
        "updated_at": "2016-10-13T01:42:24"
    },
    {
        "availability": false,
        "color": "negro",
        "created_at": "2016-10-12T21:52:01",
        "deleted_at": null,
        "discount": 0.0,
        "discount_from": null,
        "discount_to": null,
        "images": [
            {
                "pk": 272,
                "position": 0,
                "url": "https://software.madkting.com/gallery/97/products/99323160-2f35-4652-9625-ca0556cafb42.jpg"
            }
        ],
        "is_default": false,
        "pk": 1570,
        "price": 390.0,
        "secondary_color": "False",
        "size": "m",
        "sku": "16_2",
        "stock": 1,
        "updated_at": "2016-10-13T01:42:24"
    },
    {
        "availability": false,
        "color": "negro",
        "created_at": "2016-10-12T21:52:01",
        "deleted_at": null,
        "discount": 0.0,
        "discount_from": null,
        "discount_to": null,
        "images": [
            {
                "pk": 272,
                "position": 0,
                "url": "https://software.madkting.com/gallery/97/products/99323160-2f35-4652-9625-ca0556cafb42.jpg"
            }
        ],
        "is_default": false,
        "pk": 1571,
        "price": 390.0,
        "secondary_color": "False",
        "size": "l",
        "sku": "16_3",
        "stock": 0,
        "updated_at": "2016-10-13T01:42:24"
    },
    {
        "availability": false,
        "color": "blanco",
        "created_at": "2016-10-12T21:52:01",
        "deleted_at": null,
        "discount": 0.0,
        "discount_from": null,
        "discount_to": null,
        "images": [
            {
                "pk": 272,
                "position": 0,
                "url": "https://software.madkting.com/gallery/97/products/99323160-2f35-4652-9625-ca0556cafb42.jpg"
            }
        ],
        "is_default": false,
        "pk": 1572,
        "price": 390.0,
        "secondary_color": "False",
        "size": "s",
        "sku": "16_4",
        "stock": 9,
        "updated_at": "2016-10-13T01:42:24"
    },
    {
        "availability": false,
        "color": "blanco",
        "created_at": "2016-10-12T21:52:01",
        "deleted_at": null,
        "discount": 0.0,
        "discount_from": null,
        "discount_to": null,
        "images": [
            {
                "pk": 272,
                "position": 0,
                "url": "https://software.madkting.com/gallery/97/products/99323160-2f35-4652-9625-ca0556cafb42.jpg"
            }
        ],
        "is_default": false,
        "pk": 1573,
        "price": 390.0,
        "secondary_color": "False",
        "size": "m",
        "sku": "16_5",
        "stock": 4,
        "updated_at": "2016-10-13T01:42:24"
    },
    {
        "availability": false,
        "color": "blanco",
        "created_at": "2016-10-12T21:52:01",
        "deleted_at": null,
        "discount": 0.0,
        "discount_from": null,
        "discount_to": null,
        "images": [
            {
                "pk": 272,
                "position": 0,
                "url": "https://software.madkting.com/gallery/97/products/99323160-2f35-4652-9625-ca0556cafb42.jpg"
            }
        ],
        "is_default": false,
        "pk": 1574,
        "price": 390.0,
        "secondary_color": "False",
        "size": "l",
        "sku": "16_6",
        "stock": 0,
        "updated_at": "2016-10-13T01:42:24"
    }
]