addInventorySupplier
The method allows you to add a new supplier or update an existing one in BaseLinker storage.
Input parameters
Output data:
A sample request in PHP:
supplier_id | int | (optional) Supplier identifier. If provided, the existing supplier will be updated. |
name | varchar(40) | Supplier name |
take_product_cost_from | varchar(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_from | varchar(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 |
address | varchar(200) | (optional) Supplier address |
postcode | varchar(20) | (optional) Supplier postal code |
city | varchar(80) | (optional) Supplier city |
phone | varchar(40) | (optional) Supplier phone number |
varchar(200) | (optional) Supplier email address | |
email_copy_to | varchar(200) | (optional) Additional email addresses for correspondence |
currency | varchar(3) | (optional) Default supplier currency (e.g. EUR, USD) |
Output data
The method returns the data in JSON format.
status | varchar(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_id | int | Created or updated supplier identifier |
Sample
Input data:Output data:
A sample request in PHP: