### GET All Sale Conditions Examples Source: https://docs.bsale.dev/PE/condicion-de-venta Examples of how to query the endpoint to list all sale conditions with different parameters. ```http GET /v1/sale_conditions.json?limit=10&offset=0 ``` ```http GET /v1/sale_conditions.json?fields=[name,ledgeraccount] ``` ```http GET /v1/sale_conditions.json?state=0 ``` -------------------------------- ### GET List of Sucursales Examples Source: https://docs.bsale.dev/PE/sucursales Examples of how to request a list of sucursales with different query parameters. ```http GET /v1/offices.json?limit=10&offset=0 ``` ```http GET /v1/offices.json?fields=[name,address,costcenter] ``` ```http GET /v1/offices.json?state=0 ``` -------------------------------- ### GET List of Retenciones with Parameters Source: https://docs.bsale.dev/MX/retencion Examples of how to query the list of retenciones using various parameters like limit, offset, fields, and state. ```http GET /v1/withholding.json?limit=10&offset=0 ``` ```http GET /v1/withholding.json?fields=[name,percentage] ``` ```http GET /v1/withholding.json?state=0 ``` -------------------------------- ### List Stocks Response Example Source: https://docs.bsale.dev/MX/stocks This is an example response for the GET /v1/stocks.json endpoint, showing the total count, limit, offset, and a list of stock items. ```json { "href": "https://api.bsale.com.mx/v1/stocks.json", "count": 1049, "limit": 2, "offset": 0, "items": [ { "quantity": 60.36, "quantityReserved": 0, "quantityAvailable": 60.36, "variant": { "href": "https://api.bsale.com.mx/v1/variants/351.json", "id": "351" }, "office": { "href": "https://api.bsale.com.mx/v1/offices/2.json", "id": "2" } }, { "quantity": 0, "quantityReserved": 0, "quantityAvailable": 0, "variant": { "href": "https://api.bsale.com.mx/v1/variants/351.json", "id": "351" }, "office": { "href": "https://api.bsale.com.mx/v1/offices/1.json", "id": "1" } } ] } ``` -------------------------------- ### GET List of Retenciones Response Source: https://docs.bsale.dev/MX/retencion Example response for a GET request to list retenciones, showing multiple items. ```json { "href": "https://api.bsale.com.mx/v1/withholding.json", "count": 2, "limit": 25, "offset": 0, "items": [ { "href": "https://api.bsale.com.mx/v1/withholding/1.json", "id": 1, "name": "Retención", "percentage": 1.25, "code": "001", "state": 1 }, { "href": "https://api.bsale.com.mx/v1/withholding/2.json", "id": 2, "name": "Retención ISR", "percentage": 1.25, "code": "001", "state": 0 } ] } ``` -------------------------------- ### GET List of Coins with Parameters Source: https://docs.bsale.dev/monedas Examples of how to retrieve a list of coins using various query parameters for filtering and pagination. ```http GET /v1/coins.json?limit=10&offset=0 ``` ```http GET /v1/coins.json?fields=[name,symbol,state] ``` ```http GET /v1/coins.json?default=true ``` -------------------------------- ### List All Taxes Example Source: https://docs.bsale.dev/MX/impuestos This example shows the JSON response when listing all taxes. It includes pagination and item details. ```json { "href": "https://api.bsale.com.mx/v1/taxes.json", "count": 2, "limit": 25, "offset": 0, "items": [ { "href": "https://api.bsale.com.mx/v1/taxes/2.json", "id": 2, "name": "IVA 0%", "percentage": "0.0", "forAllProducts": 1, "ledgerAccount": null, "code": "002", "state": 0 }, { "href": "https://api.bsale.com.mx/v1/taxes/1.json", "id": 1, "name": "IVA", "percentage": "16.0", "forAllProducts": 0, "ledgerAccount": null, "code": "002", "state": 0 } ] } ``` -------------------------------- ### Example Return Details Response Source: https://docs.bsale.dev/PE/devoluciones An example JSON response for retrieving the details of a return. ```JSON { "href": "https://api.bsale.io/v1/returns/1/details.json", "count": 2, "limit": 25, "offset": 0, "items": [ { "href": "https://api.bsale.io/v1/returns/1/details/1.json", "id": 1, "quantity": 2.8, "quantityDevStock": 2.8, "variantStock": 59.37, "variantCost": 3200 }, { "href": "https://api.bsale.io/v1/returns/1/details/2.json", "id": 2, "quantity": 1.64, "quantityDevStock": 1.64, "variantStock": 45.44, "variantCost": 3200 } ] } ``` -------------------------------- ### List Returns with Limit and Offset Source: https://docs.bsale.dev/MX/devoluciones Example of how to retrieve a specific number of returns and paginate through results. Use 'limit' to set the number of items and 'offset' to specify the starting point. ```http GET /v1/returns.json?limit=10&offset=0 ``` -------------------------------- ### Response OK Example Source: https://docs.bsale.dev/PE/payments-ecommerce Example of a successful response structure from the API. ```json { "code": "codigo de error (400, 404, 500)", "errors": { "msg": "mensaje de error", "data": "body enviado" } } ``` -------------------------------- ### Get a Specific Client with Expanded Data Source: https://docs.bsale.dev/MX/clientes This example shows how to retrieve a specific client's details and include related data such as contacts and payment type in the same request. ```HTTP GET /v1/clients/80.json?expand=[contacts,payment_type] ``` -------------------------------- ### GET Collection of Dynamic Attributes Examples Source: https://docs.bsale.dev/MX/atributos-dinamicos Examples of GET requests to retrieve collections of dynamic attributes. These examples demonstrate filtering and expanding related data. ```http GET /v1/dynamic_attributes.json?limit=10&offset=0 ``` ```http GET /v1/dynamic_attributes.json?fields=[name,type,state] ``` ```http GET /v1/dynamic_attributes.json?paymenttypeid=1 ``` ```http GET /v1/dynamic_attributes.json?expand=[coin,details] ``` ```http GET /v1/dynamic_attributes.json?documenttypeid=8 ``` -------------------------------- ### Obtener Clientes (GET) Source: https://docs.bsale.dev/get-started Ejemplo de cómo realizar una petición GET para obtener la lista de clientes. Requiere un token de acceso en la cabecera. ```bash curl -i -H "access_token: tutokendeacceso" -X GET https://api.bsale.io/v1/clients.json ``` -------------------------------- ### GET Single Dynamic Attribute Example Source: https://docs.bsale.dev/MX/atributos-dinamicos Example of a GET request to retrieve a specific dynamic attribute by its ID. The 'expand' parameter can be used to include related data. ```http GET /v1/dynamic_attributes/3.json?expand=[payment_type] ``` -------------------------------- ### Full Document Submission Example Source: https://docs.bsale.dev/documentos A comprehensive example demonstrating a POST request to generate a document, including all optional fields like client details, item specifics, payments, references, and dynamic attributes. ```json { "documentTypeId": 8, "officeId": 1, "emissionDate": 1407715200, "expirationDate": 1407715200, "declareSii": 1, "priceListId": 18, "client": { "code": "12345678-9", "city": "Puerto Varas", "company": "Imaginex", "municipality": "comuna", "activity": "giro", "address": "direccion" }, "details": [ { "variantId": 1, "netUnitValue": 23438, "quantity": 1, "taxId": "[1,2]", "comment": "Producto 1", "discount": 0 } ], "payments": [ { "paymentTypeId": 1, "amount": 27891, "recordDate": 1407715200 } ], "references": [ { "number": 123, "referenceDate": 1407715200, "reason": "Orden de Compra 123", "codeSii": 801 } ], "dynamicAttributes": [ { "description": "098 codigo servicio", "dynamicAttributeId": 17 }, { "description": "Observacion nomal, sin anotaciones", "dynamicAttributeId": 18 } ] } ``` -------------------------------- ### List All Discounts with Parameters Source: https://docs.bsale.dev/PE/descuentos Example of how to limit and offset the results when retrieving a list of discounts. ```http GET /v1/discounts.json?limit=10&offset=0 ``` ```http GET /v1/discounts.json?fields=[name,percentage,state] ``` -------------------------------- ### Get Tax Count Example Source: https://docs.bsale.dev/MX/impuestos This example shows the JSON response for the total count of taxes. ```json { "count": 3 } ``` -------------------------------- ### POST Create Retención Response Source: https://docs.bsale.dev/MX/retencion Example response after successfully creating a new retención. ```json { "href": "https://api.bsale.com.mx/v1/withholding/10.json", "id": 10, "name": "Nombre de la nueva retención", "percentage": 1.25, "code": "001", "state": 0 } ``` -------------------------------- ### Response for /products.json Source: https://docs.bsale.dev/PE/productos-y-servicios Example JSON response when retrieving a list of products. ```JSON { "href": "https://api.bsale.io/v1/products.json", "count": 693, "limit": 3, "offset": 0, "items": [ { "href": "https://api.bsale.io/v1/products/731.json", "id": 731, "name": "11% Avalúo Fiscal Depto 515,", "description": null, "classification": 1, "ledgerAccount": "", "costCenter": "", "allowDecimal": 0, "stockControl": 0, "printDetailPack": 0, "state": 0, "prestashopProductId": 0, "presashopAttributeId": 0, "product_type": { "href": "https://api.bsale.io/v1/product_types/1.json", "id": "1" }, "product_taxes": { "href": "https://api.bsale.io/v1/products/731/product_taxes.json" } }, { "href": "https://api.bsale.io/v1/products/474.json", "id": 474, "name": "24 clases 3 veces a la semana", "description": null, "classification": 3, "ledgerAccount": "", "costCenter": "", "allowDecimal": 0, "stockControl": 0, "printDetailPack": 0, "state": 0, "prestashopProductId": 0, "presashopAttributeId": 0, "product_type": { "href": "https://api.bsale.io/v1/product_types/1.json", "id": "1" }, "product_taxes": { "href": "https://api.bsale.io/v1/products/474/product_taxes.json" } }, { "href": "https://api.bsale.io/v1/products/703.json", "id": 703, "name": "2x1", "description": null, "classification": 3, "ledgerAccount": null, "costCenter": null, "allowDecimal": 0, "stockControl": 0, "printDetailPack": 0, "state": 0, "prestashopProductId": 0, "presashopAttributeId": 0, "product_type": { "href": "https://api.bsale.io/v1/product_types/1.json", "id": "1" }, "product_taxes": { "href": "https://api.bsale.io/v1/products/703/product_taxes.json" } } ], "next": "https://api.bsale.io/v1/products.json?limit=3&offset=3" } ``` -------------------------------- ### Get Discount Count with State Filter Source: https://docs.bsale.dev/PE/descuentos Example of a GET request to count discounts, with an option to filter by state (active/inactive). ```http GET /v1/discounts/count.json?state=0 ``` -------------------------------- ### Create Return Request Example Source: https://docs.bsale.dev/devoluciones This is a full example of a POST request to create a return. It includes details for the return, client information, and specifies the type of adjustment (price or text). ```json { "documentTypeId": 9, "officeId": 1, "expirationDate": 1407384000, "emissionDate": 1407384000, "referenceDocumentId": 11528, "motive": "prueba api", "declareSii": 1, "priceAdjustment": 0, "editTexts": 0, "type": 1, "client": { "code": "1-9", "city": "Puerto Varas", "municipality": "comuna", "activity": "giro", "address": "direccion" }, "details": [ { "documentDetailId": 21493, "quantity": 1, "unitValue": 0 } ] } ``` -------------------------------- ### List All Users with Parameters Source: https://docs.bsale.dev/usuarios Demonstrates how to list all users using various query parameters like limit, offset, fields, expand, and filters for name, email, office, and state. ```http GET /v1/users.json?limit=10&offset=0 ``` ```http GET /v1/users.json?fields=[firstname,lastname] ``` ```http GET /v1/users.json?officeid=1 ``` ```http GET /v1/users.json?expand=[office] ``` ```http GET /v1/users.json?state=0 ``` -------------------------------- ### Get Specific Shipping Type Source: https://docs.bsale.dev/PE/tipos-de-despacho Example of how to retrieve a single shipping type by its ID. ```http GET /v1/shipping_types/6.json ``` -------------------------------- ### Create Product Response JSON Source: https://docs.bsale.dev/PE/productos-y-servicios Example response after successfully creating a product. Includes the product ID and its API endpoint. ```json { "stockControl": 1, "name": "Calcetines", "ledgerAccount": "", "href": "https://api.bsale.io/v1/products/97.json", "prestashopProductId": 0, "presashopAttributeId": 0, "costCenter": "", "printDetailPack": 0, "product_type": { "href": "https://api.bsale.io/v1/product_types/1.json", "id": "1" }, "classification": 1, "description": "", "id": 97, "state": 0, "allowDecimal": 0 } ``` -------------------------------- ### Retrieve a Specific Discount Source: https://docs.bsale.dev/PE/descuentos Example of a GET request to retrieve a single discount by its ID. ```json { "href": "https://api.bsale.io/v1/discounts/1.json", "id": 1, "name": "Descuentos cliente preferencial", "percentage": "14.3", "state": 1, "automatic": 0 } ``` -------------------------------- ### List All Taxes with Parameters Source: https://docs.bsale.dev/PE/impuestos Example of how to list taxes using query parameters for limit and offset. The 'limit' parameter controls the number of items per response, and 'offset' is used for pagination. ```http GET /v1/taxes.json?limit=10&offset=0 ``` ```http GET /v1/taxes.json?fields=[name,percentage,state] ``` -------------------------------- ### GET Single Retención Response Source: https://docs.bsale.dev/MX/retencion Example response for retrieving a specific retención by its ID. ```json { "href": "https://api.bsale.com.mx/v1/withholding/1.json", "id": 1, "name": "Retención", "percentage": 10.6667, "code": "002", "state": 0 } ``` -------------------------------- ### Retrieve a Specific Discount Source: https://docs.bsale.dev/descuentos Example of an HTTP GET request to retrieve a single discount by its ID. ```http GET /v1/discounts/1.json ``` -------------------------------- ### Create Web Description Example Source: https://docs.bsale.dev/MX/descripcion-web This JSON payload demonstrates how to create a 'normal' type web description for a product, including default variant, images, and shipping information. Ensure all required fields are populated. ```json { "productId": 9, "idVariantDefault": 53, "name": "20W USB-C Power Adapter", "displayNotice": "", "urlImg": "https://wilsonstore.cl/cdn/shop/files/WILWR8024301001_1_604x.jpg?v=1695307375", "urlVideo": "null", "description": "Charging cable sold separately", "variantShippingAll": 1, "order": 1, "state": 1, "productType": "normal", "integration": { "order_by": 4 }, "orderedVariants": [ { "id": 2, "order": 2, "show": 1 } ], "variantsShipping": [ { "width": 2.0, "depth": 1.5, "length": 0.8 } ], "pictures": [ { "href": "https://wilsonstore.cl/cdn/shop/files/WILWR8024301001_1_604x.jpg?v=1695307375", "legendImage": "legendImage", "order": 0 } ] } ``` -------------------------------- ### Response for /clients.json Source: https://docs.bsale.dev/MX/clientes This is an example of the JSON response when retrieving a list of clients. ```JSON { "href": "https://api.bsale.com.mx/v1/clients.json", "count": 112, "limit": 25, "offset": 0, "items": [ { "href": "https://api.bsale.com.mx/v1/clients/65.json", "id": 65, "firstName": "Público en", "lastName": "General", "code": "XAXX010101000", "phone": "", "company": "", "facebook": "", "twitter": "", "hasCredit": 1, "maxCredit": "10000.0", "state": 1, "activity": "Sin Giro", "city": "", "district": "", "address": "", "companyOrPerson": 0, "points": 0, "pointsUpdated": "", "accumulatePoints": 0, "sendDte": 0, "prestashopClienId": 0, "contacts": { "href": "https://api.bsale.com.mx/v1/clients/65/contacts.json" }, "attributes": { "href": "https://api.bsale.com.mx/v1/clients/65/attributes.json" }, "addresses": { "href": "https//api.bsale.io/v1/clients/65/addresses.json" } }, { "href": "https://api.bsale.com.mx/v1/clients/102.json", "id": 102, "firstName": "Adriana", "lastName": "Talhouk", "code": "XAXX010101000", "phone": "", "company": "Adriana Talhouk", "note": null, "facebook": null, "twitter": "", "hasCredit": 1, "maxCredit": "10000.0", "state": 0, "activity": "Sin Giro", "city": "", "district": "", "address": "", "companyOrPerson": 0, "points": 0, "pointsUpdated": "", "accumulatePoints": 0, "sendDte": 0, "prestashopClienId": 0, "contacts": { "href": "https://api.bsale.com.mx/v1/clients/102/contacts.json" }, "attributes": { "href": "https://api.bsale.com.mx/v1/clients/102/attributes.json" }, "addresses": { "href": "https//api.bsale.io/v1/clients/102/addresses.json" } } ] } ``` -------------------------------- ### Crear Producto (POST) Source: https://docs.bsale.dev/get-started Ejemplo de cómo realizar una petición POST para crear un nuevo producto. Se debe incluir el token de acceso y el cuerpo de la petición en formato JSON. ```bash curl --location --request POST 'https://api.bsale.io/v1/products.json' \ --header 'access_token: tutokendeacceso' \ --header 'Content-Type: application/json' \ --data-raw '{ "name": "Monthly subscription #01AZ", "classification": 1, "productTypeId": 5 }' ``` -------------------------------- ### Retrieve Checkout Token Source: https://docs.bsale.dev/PE/pedidos-web Example of a GET request to retrieve a checkout token. This is typically used to initiate a checkout process. ```json { "code": 200, "data": { "id": 43, "token": "628699ed3b62ddc5cc8fa71204b39384a9281556", "clientName": "Armando", "clientLastName": "Castillos", "clientEmail": "pruebas@imaginex-bsale.cl", "clientPhone": "+90000001", "id_tipo_documento_tributario": 1, "clientCountry": "Chile", "clientState": "Región Metropolitana", "extrasUserData": { "user_rut": "12345678-9", "razon_social": "Castillos SA", "giro_cliente": "Construcción", "direccion": "Las nubes #8000", "ciudad": "San Pedro", "comuna": "San Pedro" }, "clientStreet": "las condes", "clientCityZone": "Las Condes", "clientPostcode": "5220000", "clientBuildingNumber": "123", "cartId": 43, "cartDetails": [ "https://api.bsale.io/v1/cart/43/detail.json" ], "spcId": 2, "ptId": 2, "payUrl": "https://bcash.bsalemarket.com/bank/v1", "createAt": 1586794547, "shippingCost": 0, "isMafs": 0, "discountCost": 0, "active": 1, "shippingComment": "Tocar el timbre", "totalCart": 29990, "pickStoreId": 0, "id_venta_documento_tributario": 9, "documentNumber": 4, "documentToken": "58fa1b313e09", "storeId": 1, "marketId": 1, "isService": 0, "withdrawStore": 0, "payProcess": "for_validate", "ptName": "Transferencia Bancaria", "stName": "Envios ultra rápidos (flash)", "total": 29990, "url": "https://api.bsale.io/v1/checkout/43.json", "orderStatus": 0, "currency": { "decimals": 0, "symbol": null, "decimalSeparator": null } } } ``` -------------------------------- ### Response for CAF Information Source: https://docs.bsale.dev/tipos-de-documentos Example JSON response for CAF details, including start and expiration dates, number ranges, and availability. ```JSON { "startDate": 1522292400, "expirationDate": 1546225200, "startNumber": 5, "endNumber": 5, "lastNumberUsed": 0, "numbersAvailable": 2, "expired": false } ``` -------------------------------- ### POST a product Source: https://docs.bsale.dev/PE/productos-y-servicios Creates a new product. ```APIDOC ## POST a product ### Description Creates a new product. ### Method POST ### Endpoint `/v1/products.json` ### Request Body - A JSON object with the structure required to create a product. (Structure not provided in source) ### Request Example (Example JSON structure not provided in source) ``` -------------------------------- ### Get Single Product Tax Response Source: https://docs.bsale.dev/PE/productos-y-servicios Example JSON response for a single product tax. It provides the tax ID and a link to the tax resource. ```JSON { "href": "https://api.bsale.io/v1/products/150/product_taxes/159.json", "id": "159", "tax": { "href": "https://api.bsale.io/v1/taxes/1.json", "id": "1" } } ``` -------------------------------- ### POST Create Variant (Basic) Source: https://docs.bsale.dev/variantes Creates a new variant for a product. This basic example includes essential fields like productId, description, and stock management options. ```json { "productId": 595, "description": "Age of empires II", "unlimitedStock": 1, "allowNegativeStock" : 1, "barCode": "70964507073261", "code": "70964507073261" } ``` -------------------------------- ### Post a Document Example Source: https://docs.bsale.dev/PE/first-steps This example demonstrates how to create an electronic invoice by sending a POST request to the documents endpoint. It includes the request body structure and a sample response. ```APIDOC ## POST /v1/documents ### Description Creates an electronic document, such as an invoice. ### Method POST ### Endpoint /v1/documents ### Request Body - **documentTypeId** (integer) - Required - The ID of the document type. - **officeId** (integer) - Required - The ID of the office. - **emissionDate** (integer) - Required - The emission date as a Unix timestamp. - **client** (object) - Required - Client details. - **code** (string) - Required - Client's identification code. - **city** (string) - Required - Client's city. - **company** (string) - Required - Client's company name. - **municipality** (string) - Required - Client's municipality. - **activity** (string) - Required - Client's business activity. - **address** (string) - Required - Client's address. - **email** (string) - Required - Client's email address. - **details** (array) - Required - An array of document detail items. - **netUnitValue** (number) - Required - The net unit value of the item. - **quantity** (integer) - Required - The quantity of the item. - **taxId** (string) - Required - The tax ID for the item. - **discount** (number) - Required - The discount applied to the item. - **comment** (string) - Optional - A comment for the item. ### Request Example ```json { "documentTypeId": 85, "officeId": 1, "emissionDate": 1686614400, "client": { "code": "987654321", "city": "Capital del Oeste", "company": "Capsule Corp", "municipality": "Capital del Oeste", "activity": "Development and research", "address": "Hoi Poi #750", "email": "dr@brief.pe" }, "details": [ { "netUnitValue": 9900, "quantity": 1, "taxId": "[1]", "discount": 0, "comment": "product example" } ] } ``` ### Response #### Success Response (200) - **href** (string) - URL to the created document. - **id** (integer) - The ID of the created document. - **emissionDate** (integer) - The emission date. - **expirationDate** (integer) - The expiration date. - **generationDate** (integer) - The generation date. - **number** (integer) - The document number. - **serialNumber** (string) - The serial number of the document. - **trackingNumber** (null) - Tracking number, if applicable. - **totalAmount** (number) - The total amount of the document. - **netAmount** (number) - The net amount. - **taxAmount** (number) - The tax amount. - **exemptAmount** (number) - The exempt amount. - **exportTotalAmount** (number) - Export total amount. - **exportNetAmount** (number) - Export net amount. - **exportTaxAmount** (number) - Export tax amount. - **exportExemptAmount** (number) - Export exempt amount. - **commissionRate** (number) - Commission rate. - **commissionNetAmount** (number) - Commission net amount. - **commissionTaxAmount** (number) - Commission tax amount. - **commissionTotalAmount** (number) - Commission total amount. - **percentageTaxWithheld** (number) - Percentage tax withheld. - **purchaseTaxAmount** (number) - Purchase tax amount. - **purchaseTotalAmount** (number) - Purchase total amount. - **address** (string) - The client's address. - **district** (string) - The client's district. - **city** (string) - The client's city. - **stamp** (null) - Stamp information, if applicable. - **urlPublicView** (string) - URL to view the document publicly. - **urlPdf** (string) - URL to download the document as PDF. - **urlPublicViewOriginal** (string) - URL to view the original document publicly. - **urlPdfOriginal** (string) - URL to download the original document as PDF. - **token** (string) - A token associated with the document. - **state** (integer) - The state of the document. - **commercialState** (integer) - The commercial state of the document. - **urlXml** (null) - URL to the XML version of the document, if applicable. - **salesId** (null) - Sales ID, if applicable. - **informed** (integer) - Information status. - **responseMsg** (null) - Response message, if any. - **document_type** (object) - Information about the document type. - **href** (string) - URL to the document type resource. - **id** (string) - The ID of the document type. - **client** (object) - Information about the client. - **href** (string) - URL to the client resource. - **id** (string) - The ID of the client. - **office** (object) - Information about the office. - **href** (string) - URL to the office resource. - **id** (string) - The ID of the office. - **user** (object) - Information about the user. - **href** (string) - URL to the user resource. - **id** (string) - The ID of the user. - **coin** (object) - Information about the currency. - **href** (string) - URL to the currency resource. - **id** (string) - The ID of the currency. - **references** (object) - Link to document references. - **href** (string) - URL to the references resource. - **document_taxes** (object) - Link to document taxes. - **href** (string) - URL to the document taxes resource. - **details** (object) - Link to document details. - **href** (string) - URL to the details resource. - **sellers** (object) - Link to document sellers. - **href** (string) - URL to the sellers resource. - **attributes** (object) - Link to document attributes. - **href** (string) - URL to the attributes resource. #### Response Example ```json { "href": "https://api.bsale.io/v1/documents/47121.json", "id": 47121, "emissionDate": 1686614400, "expirationDate": 1686614400, "generationDate": 1691003759, "number": 12437, "serialNumber": "F001-12437", "trackingNumber": null, "totalAmount": 11682.0, "netAmount": 9900.0, "taxAmount": 1782.0, "exemptAmount": 0.0, "exportTotalAmount": 0.0, "exportNetAmount": 0.0, "exportTaxAmount": 0.0, "exportExemptAmount": 0.0, "commissionRate": 0.0, "commissionNetAmount": 0.0, "commissionTaxAmount": 0.0, "commissionTotalAmount": 0.0, "percentageTaxWithheld": 0.0, "purchaseTaxAmount": 0.0, "purchaseTotalAmount": 0.0, "address": "Hoi Poi #750", "district": "Capital del Oeste", "city": "Capital del Oeste", "stamp": null, "urlPublicView": "https://app2.bsale.com.pe/view/18618/23d6ec33120b?sfd=99", "urlPdf": "https://app2.bsale.com.pe/view/18618/23d6ec33120b.pdf?sfd=99", "urlPublicViewOriginal": "https://app2.bsale.com.pe/view/18618/23d6ec33120b", "urlPdfOriginal": "https://app2.bsale.com.pe/view/18618/23d6ec33120b.pdf", "token": "23d6ec33120b", "state": 0, "commercialState": 0, "urlXml": null, "salesId": null, "informed": 2, "responseMsg": null, "document_type": { "href": "https://api.bsale.io/v1/document_types/85.json", "id": "85" }, "client": { "href": "https://api.bsale.io/v1/clients/20923.json", "id": "20923" }, "office": { "href": "https://api.bsale.io/v1/offices/1.json", "id": "1" }, "user": { "href": "https://api.bsale.io/v1/users/224.json", "id": "224" }, "coin": { "href": "https://api.bsale.io/v1/coins/1.json", "id": "1" }, "references": { "href": "https://api.bsale.io/v1/documents/47121/references.json" }, "document_taxes": { "href": "https://api.bsale.io/v1/documents/47121/document_taxes.json" }, "details": { "href": "https://api.bsale.io/v1/documents/47121/details.json" }, "sellers": { "href": "https://api.bsale.io/v1/documents/47121/sellers.json" }, "attributes": { "href": "https://api.bsale.io/v1/documents/47121/attributes.json" } } ``` ``` -------------------------------- ### Get Product Taxes Response Source: https://docs.bsale.dev/PE/productos-y-servicios Example JSON response for product taxes. It lists the associated taxes, including their IDs and links to tax details. ```JSON { "href": "https://api.bsale.io/v1/products/150/product_taxes.json", "count": 2, "limit": 25, "offset": 0, "items": [ { "href": "https://api.bsale.io/v1/products/150/product_taxes/159.json", "id": "159", "tax": { "href": "https://api.bsale.io/v1/taxes/1.json", "id": "1" } } ] } ``` -------------------------------- ### Get Product Descriptions by Price Range Source: https://docs.bsale.dev/PE/descripcion-web Retrieve product descriptions within a specified minimum and maximum price range. Note: This example uses v2 of the API. ```HTTP GET /v2/markets/:idMarket/products/market_info.json?minPrice=22000&maxPrice=230000 ``` -------------------------------- ### POST /v1/products.json Source: https://docs.bsale.dev/MX/productos-y-servicios Creates a new product. ```APIDOC ## POST /v1/products.json ### Description Creates a new product. ### Method POST ### Endpoint `/v1/products.json` ### Request Body Requires a JSON object with the structure defined in the example. ```