Products ======== En todas las llamadas es necesario enviar Authorization-Dahl en las cabeceras. Retrieve product information ---------------------------- La información de los productos no se almacena en la base de datos del sistema, sino que se consulta de forma directa con el API de Dahl. .. http:get:: /api/v1/products/{article_number}/ **Ejemplo de petición**: .. sourcecode:: http GET /api/v1/products/4514519/ HTTP/1.1 Content-Type: application/json **Ejemplo de respuesta**: .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json { "id": "4514519", "product_id": "VVS_192055", "images": [ { "asset_url": "https://d3v2rpes8cyan4.cloudfront.net/D10000100178751-KnIhhS6F8sDLir6Dx9ZPx.jpeg", "asset_type": "Bild 1" } ], "assortment_ids": [ "default" ], "description": "", "supply_group": "LAG", "discontinued": false, "product_slug": "lodkoppling-vvs-192055", "classifications": [], "ean": "", "assets": [], "article_number": "4514519", "tradepoint": "ecom", "name": "LÖDKOPPLING 12 INKLUSIVE KOPPLINGSMUTTER M22X1,5 ALTECH", "attributes": [ { "attribute_value": "4514519", "attribute_name": "articleNumber", "attribute_label": "Art. nr.", "sort": 0 }, { "attribute_value": "12", "attribute_name": "Dimension", "attribute_label": "Dimension", "sort": 2 }, { "attribute_value": "AZH-mässing", "attribute_name": "Material", "attribute_label": "Material", "sort": 7 }, { "attribute_value": "4514551", "attribute_name": "Leverantörs Art. nr.", "attribute_label": "Leverantörs Art. nr.", "sort": 99 } ], "campaign_ids": [], "filter_tags": [ "express-pickup", "express-delivery" ], "variant_slug": "lodkoppling-12-inklusive-kopplingsmutter-m22x1-5-altech-4514519" } Retrieve product price ---------------------- .. http:get:: /api/v1/products/{article_number}/price/ **Ejemplo de petición**: .. sourcecode:: http GET /api/v1/products/4514519/price/ HTTP/1.1 Content-Type: application/json **Ejemplo de respuesta**: .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json { "article_number": "4514519", "net_price": "27.29", "price_type": "regular", "sales_price": "60.50", "customer_discount_price": "28.43", "pre_campaign_price": "27.29", "sales_price_unit": "stk", "ask_for_price": false, "discounts": [ { "name": "Kundrabatt", "type": "DIA1", "percentage": "53.00", "amount": "32.07" }, { "name": "Onlinerabatt", "type": "DIA6", "percentage": "4.00", "amount": "1.14" } ], "discount_amount": "33.21", "discount_percentage": "54.89", "alloying_price": "0.00", "alloying_unit": "", "alloying_amount": "0.00" } Retrieve product stock ---------------------- .. http:get:: /api/v1/products/{article_number}/stock/ Para esta llamada es necesario indicar como parámetro del GET ``location_id``. :query location_id: valor de ``location_id`` asociado al comercio **Ejemplo de petición**: .. sourcecode:: http GET /api/v1/products/4514519/stock/?location_id=904 HTTP/1.1 Content-Type: application/json **Ejemplo de respuesta**: .. sourcecode:: http HTTP/1.1 200 OK Content-Type: application/json { "location_id": "904", "availability_date": null, "availability_date_iso": null, "quantity": 53, "sub_availabilities": [], "order_multiple": 1, "stocked": true, "available_from_days": null, "available_to_days": null, "availability": "green" }