### Create a Product Source: https://github.com/ordermentum/javascript-sdk/blob/develop/README.md Create a new product using the SDK. The specific details for the product should be provided within the empty object. ```javascript const response = client.products.create({ }); ``` -------------------------------- ### Initialize Ordermentum SDK Client Source: https://github.com/ordermentum/javascript-sdk/blob/develop/README.md Import and create an SDK client instance using your authentication token. This client will be used for all subsequent API calls. ```javascript import createClient from 'ordermentum-sdk'; const client = createClient({ token: '[TOKEN]' }); ``` -------------------------------- ### Authenticate with Ordermentum API Source: https://github.com/ordermentum/javascript-sdk/blob/develop/README.md Use this cURL command to obtain an authentication token by providing your username, password, and grant type. ```bash curl \ -X POST \ -d username=example@example.com \ -d password=secret \ -d grant_type=password \ "https://app.ordermentum.com/v1/auth" ``` -------------------------------- ### Find All Products Source: https://github.com/ordermentum/javascript-sdk/blob/develop/README.md Retrieve a list of all products for a given supplier. Ensure the supplier ID is correctly provided. ```javascript const products = client.products.findAll({ supplierId: '' }); ``` -------------------------------- ### Find All Invoices Source: https://github.com/ordermentum/javascript-sdk/blob/develop/README.md Fetch a list of all invoices associated with a particular supplier. The supplier ID must be provided. ```javascript const invoices = client.invoices.findAll({ supplierId: '' }); ``` -------------------------------- ### Find All Orders Source: https://github.com/ordermentum/javascript-sdk/blob/develop/README.md Retrieve a list of all orders for a specified supplier. The supplier ID is a required parameter. ```javascript const orders = client.orders.findAll({ supplierId: '' }); ``` -------------------------------- ### Update an Order Source: https://github.com/ordermentum/javascript-sdk/blob/develop/README.md Update an existing order by providing its ID and the updated order details. The update payload should be an object. ```javascript const response = client.orders.update(id, { }); ``` -------------------------------- ### Update an Invoice Source: https://github.com/ordermentum/javascript-sdk/blob/develop/README.md Modify an existing invoice by supplying its ID and the new invoice data. The data should be structured as an object. ```javascript const response = client.invoices.update(id, { }); ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.