### Product JSON Response Example Source: https://www.irroba.com.br/dev/docs Illustrates a typical JSON response structure for a product, showcasing nested objects for product descriptions, discounts, options, and NCM information. This example is based on an API response. ```json { "success": "true", "pagination": { "currentPage": 1, "previousPageUrl": null, "nextPageUrl": null, "firstItem": 1, "lastItem": 2 }, "data": [ { "product_id": 48, "model": "0801", "image": "", "manufacturer_id": 0, "price": "1138.75", "cost_price": "0.00", "price_sale": "0.00", "price_pos": "0.00", "weight": "3.0000", "length": "0.0000", "width": "0.0000", "height": "0.0000", "sku": "7909159650921", "minimum": 1, "multiple_sales_quantity": 1, "status": 0, "criticized": 0, "criticized_message": null, "date_added": "2017-06-06 15:46:24", "date_modified": "2017-06-19 15:57:40", "user_log": "murilo-irroba", "approval_certificate": null, "product_description": [ { "language_id": 2, "name": "Produto Teste", "description": "", "tag": "", "meta_title": "Produto Teste", "meta_description": "", "meta_keyword": "", "description_resume": "" } ], "product_image": [], "product_to_category": [ { "category_id": 240, "name": "Equipe 1" } ], "product_special": [], "product_discount": [ { "customer_group_id": 8, "quantity": 1, "priority": 1, "price": "100.00", "date_start": "2017-05-31", "date_end": "2017-06-15" } ], "product_option": [ { "option_id": 13, "name": "Tamanho de Calçado Adulto", "product_option_value": [ { "option_value_id": 126, "quantity": 1, "price": "0.00", "price_prefix": "+", "weight": "0.0000", "weight_prefix": "+", "name": "50" }, { "option_value_id": 125, "quantity": 1, "price": "0.00", "price_prefix": "+", "weight": "0.0000", "weight_prefix": "+", "name": "49" } ] } ], "ncm": { "name": "PRODUTO TESTE" } } ] } ``` -------------------------------- ### Product Data Example Source: https://www.irroba.com.br/dev/docs An example of a product data object, including basic product information, pricing, stock details, descriptions, categories, and special offers. It also shows the nested structure for product options and their values. ```json { "success": "true", "data": [ { "product_id": 48, "model": "0801", "image": "", "manufacturer_id": 0, "price": "1138.75", "price_pos": "0.00", "price_attacked": "0.00", "cost_price": "0.00", "weight": "3.0000", "length": "0.0000", "width": "0.0000", "height": "0.0000", "subtract": 1, "sku": "7909159650921", "minimum": 1, "multiple_sales_quantity": 1, "status": 0, "criticized": 0, "criticized_message": null, "date_added": "2017-06-06 15:46:24", "date_modified": "2017-06-19 15:57:40", "user_log": "murilo-irroba", "approval_certificate": null, "product_description": [ { "language_id": 2, "name": "Produto Teste", "description": "", "tag": "", "meta_title": "Produto Teste", "meta_description": "", "meta_keyword": "", "description_resume": "" } ], "product_image": [], "product_to_category": [ { "category_id": 240, "name": "Equipe 1" } ], "product_special": [], "product_discount": [ { "customer_group_id": 8, "quantity": 1, "priority": 1, "price": "100.00", "date_start": "2017-05-31", "date_end": "2017-06-15" } ], "product_option": [ { "option_id": 13, "name": "Tamanho de Calçado Adulto", "product_option_value": [ { "option_value_id": 126, "quantity": 1, "subtract": 1, "price": "0.00", "price_prefix": "+", "weight": "0.0000", "weight_prefix": "+", "name": "50" }, { "option_value_id": 125, "quantity": 1, "subtract": 1, "price": "0.00", "price_prefix": "+", "weight": "0.0000", "weight_prefix": "+", "name": "49" }, { "option_value_id": 124, "quantity": 1, "subtract": 1, "price": "0.00", "price_prefix": "+", "weight": "0.0000", "weight_prefix": "+", "name": "48" }, { "option_value_id": 51, "quantity": 1, "subtract": 1 } ] } ] } ] } ``` -------------------------------- ### Get Token Request Example Source: https://www.irroba.com.br/dev/docs Demonstrates how to request an authorization token using a POST request. The request body should include the user's username and password. ```http POST https://api.irroba.com.br/v1/getToken ``` -------------------------------- ### Get Product List Source: https://www.irroba.com.br/dev/docs Retrieves a list of products with information on promotions, discounts, and stock. Supports sorting via URL parameters. The GET request is made to the /product endpoint. ```HTTP GET https://api.irroba.com.br/v1/product ``` -------------------------------- ### Address Creation/Update API Response Example (JSON) Source: https://www.irroba.com.br/dev/docs Example of a successful JSON response after an address has been created or updated. It indicates success and provides a confirmation message. ```json { "success": "true", "data": "Address inserted successfully!" } ``` -------------------------------- ### Create Address API Request Example (JSON) Source: https://www.irroba.com.br/dev/docs Example of a JSON request payload for creating or updating a customer address. It includes essential customer and address details required by the API. ```json { "customer_id": 33, "firstname": "Teste API", "address_1": "Rua Romênia", "number_home": "465", "neighborhood": "Jardim Santa Cecília", "city": "Guarulhos", "postcode": "07123400", "zone_id": 464 } ``` -------------------------------- ### GET /products Source: https://www.irroba.com.br/dev/docs Retrieves a list of products with pagination and detailed information. ```APIDOC ## GET /products ### Description Retrieves a list of products, including pagination details and comprehensive information about each product. ### Method GET ### Endpoint /products ### Query Parameters * **page** (int) - Optional - The page number to retrieve. * **limit** (int) - Optional - The number of items per page. ### Response #### Success Response (200) - **success** (String) - Indicates if the request was successful ('true' if no issues). - **pagination** (Object) - Contains pagination information. - **currentPage** (int) - The current page number. - **previousPage** (String) - URL of the previous page (or null). - **nextPage** (String) - URL of the next page (or null). - **firstItem** (int) - Index of the first item on this page. - **lastItem** (int) - Index of the last item on this page. - **data** (Array of Objects) - An array containing product details. - **product_id** (int) - The unique identifier for the product. - **model** (String) - The product's model code. - **image** (String) - Path to the main product image. - **external_reference** (String) - External reference code for the product. - **manufacturer_id** (int) - The ID of the product's manufacturer. - **price** (String) - The selling price of the product. - **cost_price** (String) - The cost price of the product. - **weight** (String) - The weight of the product. - **length** (String) - The length of the product. - **width** (String) - The width of the product. - **height** (String) - The height of the product. - **status** (int) - The status of the product (1 for enabled, 0 for disabled). - **date_added** (String) - The date the product was added (ISO 8601 format). - **date_modified** (String) - The date the product was last modified (ISO 8601 format). - **user_log** (String) - The user who last modified the product. - **approval_certificate** (String) - Approval certificate for PPE products. - **product_description** (Object) - Descriptive information about the product. - **language_id** (int) - The language ID for the description (e.g., '2' for Portuguese). - **name** (String) - The name of the product. - **description** (String) - The detailed description of the product. - **tag** (String) - Tags associated with the product. - **meta_title** (String) - Meta title for search engines. - **meta_description** (String) - Meta description for search engines. - **meta_keyword** (String) - Meta keywords for search engines. - **description_resume** (String) - A summarized description. - **product_image** (Object) - Secondary images of the product. - **image** (String) - Path to a secondary product image. - **product_special** (Object) - Special promotions configured for the product. - **customer_group_id** (int) - ID of the customer group eligible for the promotion. - **priority** (int) - Priority of the promotion. - **price** (Float) - The promotional price. - **date_start** (String) - The start date of the promotion. - **date_end** (String) - The end date of the promotion. - **product_discount** (Object) - Discounts configured for the product. - **customer_group_id** (int) - ID of the customer group eligible for the discount. - **quantity** (int) - The quantity required for the discount. - **priority** (int) - Priority of the discount. - **price** (String) - The discounted price. - **date_start** (String) - The start date of the discount. - **date_end** (String) - The end date of the discount. - **product_option** (Object) - Stock options for the product. - **option_id** (int) - The ID of the parent option. - **name** (String) - The name of the option. - **product_option_value** (Object) - Child option values. - **option_value_id** (int) - The ID of the child option value. - **quantity** (int) - The quantity in stock for this option. - **price** (String) - Any price modification associated with this option. #### Response Example { "success": "true", "pagination": { "currentPage": 1, "previousPage": null, "nextPage": "/products?page=2", "firstItem": 1, "lastItem": 10 }, "data": [ { "product_id": 123, "model": "XYZ-001", "image": "/path/to/main/image.jpg", "external_reference": "EXT-REF-001", "manufacturer_id": 45, "price": "199.99", "cost_price": "100.00", "weight": "1.5", "length": "30", "width": "20", "height": "10", "status": 1, "date_added": "2023-01-01T10:00:00Z", "date_modified": "2023-01-15T11:30:00Z", "user_log": "admin", "approval_certificate": "CERT-12345", "product_description": { "language_id": 2, "name": "Example Product", "description": "This is a detailed description.", "tag": "electronics, gadget", "meta_title": "Example Product - Best Gadget", "meta_description": "Buy the best example product for your needs.", "meta_keyword": "product, gadget, electronics", "description_resume": "A brief summary." }, "product_image": [ {"image": "/path/to/secondary/image1.jpg"} ], "product_special": [ { "customer_group_id": 8, "priority": 1, "price": 179.99, "date_start": "2023-02-01T00:00:00Z", "date_end": "2023-02-28T23:59:59Z" } ], "product_discount": [ { "customer_group_id": 8, "quantity": 5, "priority": 1, "price": "180.00", "date_start": "2023-03-01T00:00:00Z", "date_end": "2023-03-31T23:59:59Z" } ], "product_option": [ { "option_id": 1, "name": "Color", "product_option_value": [ { "option_value_id": 10, "quantity": 50, "price": "+5.00" }, { "option_value_id": 11, "quantity": 30, "price": "0.00" } ] } ] } ] } ``` -------------------------------- ### Abandoned Cart Webhook Example Source: https://www.irroba.com.br/dev/docs This section provides an example of the content for an abandoned cart webhook, detailing the fields and their expected data types. ```APIDOC ## POST /webhooks/abandoned-cart ### Description This endpoint receives notifications for abandoned cart events. It expects a 200 OK response to confirm successful receipt. If a 200 OK is not received within 30 seconds, or if any other error occurs, the notification will be retried. ### Method POST ### Endpoint /webhooks/abandoned-cart ### Parameters #### Request Body - **id** (integer) - Required - Unique identifier for the event. - **event** (string) - Required - The type of event, expected to be 'abandoned_cart'. - **operation** (string) - Required - The operation performed, expected to be 'create'. - **urlNotifyService** (string) - Required - The URL to which the notification is sent. - **api_username** (string) - Required - The username associated with the API. - **store_user** (string) - Required - The user associated with the store. ### Request Example ```json { "id": 567, "event": "abandoned_cart", "operation": "create", "urlNotifyService": "https://webhook.site/e6453770-ad1b-40d9-8ac0-90ec3a54facc", "api_username": "totvsapi", "store_user": "integri" } ``` ### Response #### Success Response (200) - **message** (string) - Confirmation message indicating successful receipt. #### Response Example ```json { "message": "Notification received successfully." } ``` ### Retry Policies Notifications are retried up to 4 times over the next 4 hours if a 200 OK status is not received within a 30-second timeout. Subsequent retries occur at 60-minute intervals. If all retries fail, the notification will be lost. ``` -------------------------------- ### Coupon Update Response Example Source: https://www.irroba.com.br/dev/docs This example shows a successful response after updating a manufacturer. It returns a 'success' status and a data message confirming the update. ```json { "success": "true", "data": "Manufacturer updated successfully!" } ``` -------------------------------- ### Add Coupon POST Request Example Source: https://www.irroba.com.br/dev/docs This example demonstrates the required JSON payload for a POST request to the /coupon endpoint. It outlines the necessary fields and their expected formats for adding a new coupon, including its code, discount details, validity periods, and usage restrictions. ```json { "coupon_id": 134, "name": "Primeira Compra", "code": "DAY10", "type": "F", "product_id": 0, "discount": "10.0000", "free_shipping_methods": "", "logged": 1, "total": "99.9000", "discount_disabled": 1, "date_start": "2021-07-20", "date_end": "2021-08-15", "uses_total": 0, "uses_customer": "1", "status": 1, "retail_or_attacked": "Varejo e Atacado", "user_log": "lojista", "coupon_product": [], "coupon_category": [], "coupon_manufacturer": [] } ``` -------------------------------- ### Get Token Response Example Source: https://www.irroba.com.br/dev/docs Example of a successful response after requesting an authorization token. It includes a success flag and the authorization token itself within the data object. ```json { "success": "true", "data": { "authorization": "SEU TOKEN" } } ``` -------------------------------- ### POST /customer Source: https://www.irroba.com.br/dev/docs Adds a new customer to the system. ```APIDOC ## POST /customer ### Description Adds a new customer to the system. Requires a POST request with the necessary request body. ### Method POST ### Endpoint /customer ### Request Body (Details of the request body fields would be specified here, e.g., `firstname` (string), `lastname` (string), `email` (string)) ### Response (Details of the response, including success and error formats, would be specified here) ### Request Example (An example of the request body would be provided here) ``` -------------------------------- ### Irroba API Get Category by ID Request Source: https://www.irroba.com.br/dev/docs This example shows how to make a GET request to retrieve specific category data using its ID. The endpoint requires the category ID as a path parameter. ```http GET https://api.irroba.com.br/v1/category/{{id}} ``` -------------------------------- ### Product Management API Source: https://www.irroba.com.br/dev/docs This API allows for the creation and management of products within the Irroba BR platform. It includes detailed fields for product information, pricing, stock, and descriptions. ```APIDOC ## POST /websites/irroba_br_dev/products ### Description This endpoint is used to create a new product or update an existing one. It accepts a JSON payload containing comprehensive product details. ### Method POST ### Endpoint /websites/irroba_br_dev/products ### Parameters #### Request Body - **data** (Object) - Required - Object containing all product information. - **model** (String) - Required - Product Code. Maximum 120 characters. - **SKU** (String) - Optional - Barcode (8-13 digits). - **external_reference** (String) - Optional - External reference for the product. Maximum 100 characters. - **price** (Number) - Required - Product price (float). - **status** (Integer) - Required - Product status (1 Enabled, 0 Disabled). - **minimum** (String) - Optional - Minimum purchase quantity. - **multiple_sales_quantity** (String) - Optional - Multiple purchase quantity. - **subtract** (Boolean) - Optional - Whether the variation controls stock (True or False). - **manufacturer_id** (Integer) - Optional - ID of the product brand. - **manufacturer** (Object) - Optional - JSON with manufacturer information. Used if manufacturer_id is not provided. - **name** (String) - Required - Manufacturer name. - **sort_order** (Integer) - Optional - Manufacturer sort order. - **price_attacked** (Number) - Optional - Wholesale price of the product (float). - **cost_price** (Number) - Optional - Cost price of the product (float). - **weight** (Number) - Required - Product weight (float). - **length** (Number) - Optional - Product length (float). - **width** (Number) - Optional - Product width (float). - **height** (Number) - Optional - Product height (float). - **feed_gender** (Number) - Optional - Google feed gender (male, female, unisex). - **sort_order** (Integer) - Optional - Display sort order (from smallest to largest). - **approval_certificate** (String) - Optional - Approval certificate for PPE products. - **product_description** (Object) - Required - JSON with product description information. - **name** (String) - Required - Product name. Maximum 300 characters. - **description** (String) - Optional - Product description. Maximum 2500 characters. - **meta_attribute_alt** (String) - Optional - Product meta attribute. - **meta_title** (String) - Optional - Product meta title. - **description_resume** (String) - Optional - Product resume description. - **meta_description** (String) - Optional - Product meta description. - **tag** (String) - Optional - Product tags (comma-separated). - **product_option** (Array) - Optional - JSON with product stock option information. - **option_id** (Integer) - Required - Option ID. - **required** (Boolean) - Optional - Whether the option is required. - **principal** (Boolean) - Optional - Whether the option is principal. - **grid_stock** (Boolean) - Optional - Whether the option is a stock grid. - **package_name** (String) - Optional - Product package name. - **calculation_simulator** (Boolean) - Optional - Enable calculation for square type products. - **product_option_value** (Array) - Required if product_option is present - JSON with product variation information. - **option_value_id** (Integer) - Required - Variation ID. - **quantity** (Integer) - Required - Stock quantity for the variation. Negative values are treated as zero. - **reference** (String) - Optional - Stock option reference (for quantity updates). - **external_reference** (String) - Optional - External reference for stock option in your ERP. - **price** (String) - Optional - Variation price (only if different from the product price). - **subtract** (Boolean) - Optional - Whether the variation controls stock. ### Request Example ```json { "data": { "model": "PROD12345", "external_reference": "ERP-REF-XYZ", "price": 99.99, "status": 1, "weight": 1.5, "manufacturer": { "name": "Example Brand" }, "product_description": { "name": "Example Product", "description": "This is a detailed description of the example product.", "tag": "example,product" }, "product_option": [ { "option_id": 1, "required": true, "product_option_value": [ { "option_value_id": 101, "quantity": 50, "subtract": true } ] } ] } } ``` ### Response #### Success Response (200) - **id** (Integer) - The unique identifier for the created or updated product. - **message** (String) - A confirmation message. #### Response Example ```json { "id": 12345, "message": "Product created successfully." } ``` #### Error Response (400 Bad Request) - **error** (String) - A message describing the error. #### Error Response Example ```json { "error": "Model is a required field." } ``` ``` -------------------------------- ### Get Abandoned Cart Information - GET Source: https://www.irroba.com.br/dev/docs This endpoint retrieves a list of customers with abandoned carts. It is a GET request to the /customer/abandoned_cart path. No specific input parameters are detailed, implying it returns all abandoned carts by default. ```http GET https://api.irroba.com.br/v1/customer/abandoned_cart ``` -------------------------------- ### Get Specific Customer Data (GET API) Source: https://www.irroba.com.br/dev/docs Retrieves detailed information for a specific customer using their unique ID. This is a GET request to the /customer/{{id}} endpoint. No specific dependencies are mentioned, and the output is the full customer object. ```http GET https://api.irroba.com.br/v1/customer/{{id}} ``` -------------------------------- ### POST /option Source: https://www.irroba.com.br/dev/docs Creates a new product option with its associated variations. ```APIDOC ## POST /option ### Description Creates a new product option with its associated variations. ### Method POST ### Endpoint /option ### Parameters #### Request Body - **type** (string) - Required - The type of the stock option (e.g., 'select'). Max 20 characters. - **status** (int) - Required - The current status of the option (1 = Enabled, 0 = Disabled). Max 64 characters. - **sort_order** (int) - Optional - The sort order relative to other options (lowest to highest). - **name** (string) - Required - The name of the stock option. Max 300 characters. - **option_value** (array) - Optional - A JSON array containing variation information. - **sort_order** (int) - Optional - The sort order relative to other variations (lowest to highest). - **name** (string) - Required - The name of the variation. ### Request Example ```json { "type": "select", "status": 1, "sort_order": 0, "name": "opcao teste", "option_value": [ { "sort_order": 1, "name": "33" }, { "sort_order": 2, "name": "34" } ] } ``` ### Response #### Success Response (200) - **success** (string) - Indicates if the request was successful ('true' or 'false'). - **pagination** (object) - Contains pagination details (similar to GET response). - **data** (object) - Contains the created option details. - **option_id** (int) - The ID of the newly created option. - **type** (string) - The type of the option. - **sort_order** (int) - The sort order of the option. - **name** (string) - The name of the option. - **status** (int) - The status of the option (1 = Enabled, 0 = Disabled). - **option_info** (array) - An array of variation objects for the option. - **option_value_id** (int) - The ID of the variation. - **option_id** (int) - The ID of the parent option. - **sort_order** (int) - The sort order of the variation. - **name** (string) - The name of the variation. - **allow_delete** (int) - Indicates if the variation can be deleted via API (1 = Yes, 0 = No). #### Response Example ```json { "success": "true", "pagination": { "currentPage": 1, "previousPageUrl": null, "nextPageUrl": null, "firstItem": 1, "lastItem": 1 }, "data": { "option_id": 123, "type": "select", "sort_order": 0, "name": "opcao teste", "status": 1, "option_info": [ { "option_value_id": 456, "option_id": 123, "sort_order": 1, "name": "33", "allow_delete": 1 }, { "option_value_id": 457, "option_id": 123, "sort_order": 2, "name": "34", "allow_delete": 1 } ] } } ``` ``` -------------------------------- ### Coupon Delete Response Example Source: https://www.irroba.com.br/dev/docs This example illustrates a successful response after deleting a manufacturer. It indicates 'success' and provides a confirmation message. ```json { "success": "true", "data": "Manufacturer deleted successfully!" } ``` -------------------------------- ### Product Data Example Source: https://www.irroba.com.br/dev/docs A comprehensive JSON object representing a product, including its basic information, descriptions, categories, special pricing, discounts, and options with their respective values. This structure is used to display and manage product details. ```json { "success": "true", "data": [ { "product_id": 48, "model": "0801", "image": "", "manufacturer_id": 0, "price": "1138.75", "price_pos": "0.00", "price_attacked": "0.00", "cost_price": "0.00", "weight": "3.0000", "length": "0.0000", "width": "0.0000", "height": "0.0000", "subtract": 1, "sku": "7909159650921", "minimum": 1, "multiple_sales_quantity": 1, "status": 0, "criticized": 0, "criticized_message": null, "date_added": "2017-06-06 15:46:24", "date_modified": "2017-06-19 15:57:40", "user_log": "murilo-irroba", "approval_certificate": null, "product_description": [ { "language_id": 2, "name": "Produto Teste", "description": "", "tag": "", "meta_title": "Produto Teste", "meta_description": "", "meta_keyword": "", "description_resume": "" } ], "product_image": [], "product_to_category": [ { "category_id": 240, "name": "Equipe 1" } ], "product_special": [], "product_discount": [ { "customer_group_id": 8, "quantity": 1, "priority": 1, "price": "100.00", "date_start": "2017-05-31", "date_end": "2017-06-15" } ], "product_option": [ { "option_id": 13, "name": "Tamanho de Calçado Adulto", "product_option_value": [ { "option_value_id": 126, "quantity": 1, "subtract": 1, "price": "0.00", "price_prefix": "+", "weight": "0.0000", "weight_prefix": "+", "name": "50" }, { "option_value_id": 125, "quantity": 1, "subtract": 1, "price": "0.00", "price_prefix": "+", "weight": "0.0000", "weight_prefix": "+", "name": "49" }, { "option_value_id": 124, "quantity": 1, "subtract": 1, "price": "0.00", "price_prefix": "+", "weight": "0.0000", "weight_prefix": "+", "name": "48" }, { "option_value_id": 51, "quantity": 1, "subtract": 1, "price": "0.00", "price_prefix": "+", "weight": "0.0000", "weight_prefix": "+", "name": "47" } ] } ] } ] } ``` -------------------------------- ### POST /product Source: https://www.irroba.com.br/dev/docs Adds a new product to the Irroba platform. This endpoint requires a POST request with the specified request body. ```APIDOC ## POST /product ### Description Adds a new product to the Irroba platform. This endpoint requires a POST request with the specified request body. ### Method POST ### Endpoint https://api.irroba.com.br/v1/product ### Parameters #### Request Body - **price_prefix** (string) - Optional - Indicates if there will be a price increase '+' or decrease '-'. - **weight** (string) - Optional - Indicates if there is a change in the original product weight (will add or subtract from the original value). - **weight_prefix** (string) - Optional - Indicates if there will be a weight increase '+' or decrease '-'. ### Request Example { "product_id": 1, "model": "1234", "image": "", "manufacturer_id": 8, "price": "683.89", "cost_price": "0.00", "weight": "0.0000", "length": "0.0000", "width": "0.0000", "height": "0.0000", "status": 0, "date_added": "2017-02-16 10:14:56", "date_modified": "2017-05-03 13:29:12", "user_log": "user", "approval_certificate": null, "product_description": [ { "language_id": 2, "name": "Produto Teste", "description": "
Descrição do produto!
", "tag": "", "meta_title": "Produto Teste", "meta_description": "", "meta_keyword": "", "description_resume": "" } ], "product_image": [], "product_special": [ { "customer_group_id": 8, "priority": 0, "price": "4500.00", "date_start": "2016-10-31", "date_end": "2016-12-10" }, { "customer_group_id": 8, "priority": 0, "price": "15.00", "date_start": "2017-03-27", "date_end": "2017-04-30" } ], "product_discount": [], "product_option": { "option_id": 29, "name": "Único", "product_option_value": { "option_value_id": 255, "quantity": 9998, "price": "0.00", "price_prefix": "+", "weight": "0.0000", "weight_prefix": "+", "name": "Único" } } } ### Response #### Success Response (200) - **success** (string) - Indicates if the operation was successful ('true' or 'false'). - **pagination** (object) - Contains pagination details for the response. - **data** (array) - An array of product objects. #### Response Example { "success": "true", "pagination": { "currentPage": 1, "previousPageUrl": null, "nextPageUrl": null, "firstItem": 1, "lastItem": 1 }, "data": [ { "product_id": 1, "model": "1234", "image": "", "manufacturer_id": 8, "price": "683.89", "cost_price": "0.00", "weight": "0.0000", "length": "0.0000", "width": "0.0000", "height": "0.0000", "status": 0, "date_added": "2017-02-16 10:14:56", "date_modified": "2017-05-03 13:29:12", "user_log": "user", "approval_certificate": null, "product_description": [ { "language_id": 2, "name": "Produto Teste", "description": "Descrição do produto!
", "tag": "", "meta_title": "Produto Teste", "meta_description": "", "meta_keyword": "", "description_resume": "" } ], "product_image": [], "product_special": [ { "customer_group_id": 8, "priority": 0, "price": "4500.00", "date_start": "2016-10-31", "date_end": "2016-12-10" }, { "customer_group_id": 8, "priority": 0, "price": "15.00", "date_start": "2017-03-27", "date_end": "2017-04-30" } ], "product_discount": [], "product_option": { "option_id": 29, "name": "Único", "product_option_value": { "option_value_id": 255, "quantity": 9998, "price": "0.00", "price_prefix": "+", "weight": "0.0000", "weight_prefix": "+", "name": "Único" } } } ] } ``` -------------------------------- ### Manufacturer List Endpoint Example (URL) Source: https://www.irroba.com.br/dev/docs Example URL for retrieving a list of manufacturers from the API. It shows the base endpoint for the manufacturer resource. ```url https://api.irroba.com.br/v1/manufacturer ``` -------------------------------- ### Product Management API Source: https://www.irroba.com.br/dev/docs This section details various endpoints related to product management, including setting discounts, managing promotional dates, associating similar products, assigning categories, and defining product attributes. ```APIDOC ## Product Pricing and Promotions ### Description Manage product pricing, including base prices, special prices for different retailers, and promotional discount details. This includes setting up promotional periods and discounts. ### Endpoints **1. Discounts and Promotions:** - **`discount`** (Numeric, float): The discount value for a promotion. Example: `10.00` for a 10% discount. This field is only considered if `price_type` is set to "discount". - **`date_start`** (String): The start date of the promotion. - **`date_end`** (String): The end date of the promotion. **2. Specific Retailer Pricing:** - **`price_b2w`** (String): Price for B2W. - **`special_price_b2w`** (String): Special promotional price for B2W. - **`price_carrefour`** (String): Price for Carrefour. - **`special_price_carrefour`** (String): Special promotional price for Carrefour. - **`price_centauro`** (String): Price for Centauro. - **`special_price_centauro`** (String): Special promotional price for Centauro. - **`price_dafiti`** (String): Price for Dafiti. - **`special_price_dafiti`** (String): Special promotional price for Dafiti. - **`start_date_special_dafiti`** (String): Start date for Dafiti special price. Required if `special_price_dafiti` is provided. - **`end_date_special_dafiti`** (String): End date for Dafiti special price. Required if `special_price_dafiti` is provided. - **`price_magazine`** (String): Price for Magazine. - **`special_price_magazine`** (String): Special promotional price for Magazine. - **`price_mercadolivre`** (String): Price for Mercado Livre. - **`price_shopee`** (Numeric, float): Price for Shopee. - **`price_netshoes`** (String): Price for Netshoes. - **`special_price_netshoes`** (String): Special promotional price for Netshoes. - **`price_viavarejo`** (String): Price for Via Varejo. - **`special_price_viavarejo`** (String): Special promotional price for Via Varejo. ### Product Relationships - **`customer_group_id`** (String): The ID of the customer group eligible for this promotion. "8" is the default user group. ### Similar Products - **`product_like`** (JSON): A JSON object containing information about similar product categories. All other similar products linked to this product will be deleted when this field is sent. - **`like_id`** (Numeric, int): The ID of a similar product. IDs can be found using the "Products" method. Only one of `like_id` or `model` should be sent. - **`model`** (String): The model of the similar product. Only one of `like_id` or `model` should be sent. ### Product Categories - **`product_to_category`** (JSON): A JSON object containing information about product categories. All other categories linked to this product will be removed when this field is sent. - **`category_id`** (Numeric, int): The ID of the category. IDs can be found using the "Categories" method. Only one of `category_id` or `reference` should be sent. - **`reference`** (String): The reference of the category. Only one of `category_id` or `reference` should be sent. ### Product Attributes - **`product_attribute`** (JSON): A JSON object containing product attributes. - **`group`** (String): The name of the attribute group. - **`attribute`** (String): The name of the attribute. - **`text`** (String): Textual information about the attribute. - **`enable_view`** (Boolean): Indicates if the attribute should be displayed on the front-end (true means it will NOT be displayed). ### Request Example (Partial Product Update) ```json { "model": "ABC12345", "product_special": [ { "priority": 0, "price": "100,00", "date_start": "30-01-2017 10:49:32", "date_end": "30-05-2017 10:49:32" } ], "product_like": [ { "model": "Irroba" } ], "product_to_category": [ { "category_id": 123 } ], "product_attribute": [ { "group": "Material", "attribute": "Composição", "text": "Algodão", "enable_view": true } ], "price_dafiti": "99.90", "special_price_dafiti": "79.90", "start_date_special_dafiti": "01/01/2024", "end_date_special_dafiti": "31/01/2024" } ``` ### Response Example (Partial Success) ```json { "message": "Product updated successfully", "product_id": "ABC12345" } ``` ```