API documentation
Method list
Test your request
Changelog


addInventorySupplier
The method allows you to add a new supplier or update an existing one in BaseLinker storage.


Input parameters
supplier_idint(optional) Supplier identifier. If provided, the existing supplier will be updated.
namevarchar(40)Supplier name
take_product_cost_fromvarchar(20)Source of product cost for this supplier. Available values: "cost" (Product cost at the supplier), or price group ID. Price group ids can be retrieved from the method getInventoryPriceGroups
take_product_code_fromvarchar(20)Source of product code for this supplier. Available values: "sku" (Product SKU), "ean" (Product EAN), "code" (Product code at the supplier), or extra field ID. Extra field ids can be retrieved from the method getInventoryExtraFields
addressvarchar(200)(optional) Supplier address
postcodevarchar(20)(optional) Supplier postal code
cityvarchar(80)(optional) Supplier city
phonevarchar(40)(optional) Supplier phone number
emailvarchar(200)(optional) Supplier email address
email_copy_tovarchar(200)(optional) Additional email addresses for correspondence
currencyvarchar(3)(optional) Default supplier currency (e.g. EUR, USD)



Output data
The method returns the data in JSON format.
statusvarchar(30)SUCCESS - request executed correctly
ERROR - an error occurred during an API request. Error details will be described in 2 additional returned fields: error_message and error_code
supplier_idintCreated or updated supplier identifier



Sample
Input data:
Output data:
A sample request in PHP: