Methods
This section lists all methods that can be used with specific endpoint. Usually it is a mix of top level parameters from Idosell documentation and helper functons and a single method looks like this:
- resultsPage Integer
Single row contains method name as well as type of argument accepted. Sometimes, values of argument are limited to several options, and they will be presented like this:
- orderType 'wholesale'|'retail'|'dropshipping'|'deliverer'
Helper functions are discernable by color and often number of parameters, in which case they are described one by one:
- page page: Integer, limit: Integer
Some helper functions add appendable parameters - they are distinguished by another color:
- orderId String
Appendable functions are transformed into an array of Objects that are required by multiple endpoints and can be chained to add or update several objects at once. Refer to readme on how to use appendables.
Examples
This section shows example of how to use endpoints. Sometimes there are more than a single example and they look like this:
const result = await idosellRequest.searchOrders
.page(2,10)
.exec()
Important parts are highlighted like endpoint, methods and sample parameters. All examples have been tested on a Demo panel. Refer to readme on how to get idosellRequest object.
Several examples contain minimal number of paraters for endpoint to work. For example, if you want to add address, you are required to pass all associated parameters: Country, City, Post Code, Street, Name and Last Name.
const result = await idosellRequest.postClientsDeliveryAddress
.clientLogin("iai_demo")
.clientDeliveryAddressCity("Warsaw")
.clientDeliveryAddressStreet("Grzybowska")
.clientDeliveryAddressZipCode("11-111")
.clientDeliveryAddressCountry("PL")
.clientDeliveryAddressFirstName("Demo")
.clientDeliveryAddressLastName("Client")
.shopsIds([1,2])
.exec()