758

Step 1: Use the Cymbio Product Template

First of all, please fill in the product details using the product format according to the CSV product template provided by Cymbio here.

❗️

Warning:

Please ensure that you fill each mandatory field. Also, make sure to delete lines 2 and 3, prior to sending this file.

Step 2: Send the CSV product file via SFTP

Once you map your product details using our CSV template, you will push the product CSV via SFTP. SFTP is used to send product files that have already been created. Secure Shell, or SFTP, is a file transfer protocol for transferring data between a client and a server.

Step 2.1: Establishing SFTP Session

Using the following command, you may connect to the SFTP session. The prompt will change to an SFTP prompt when this command connects you to the remote session.

$ sftp {username}@your_server_ip_or_remote_hostname

You may connect to SFTP using the following command if you're using a custom SSH port (not the default port). Change customport to the port number you're currently using. This command establishes a connection to the SFTP server using the port you specified.

$ sftp -oPort=customport {username}@your_server_ip_or_remote_hostname.

Step 2.2: Transferring Files with SFTP

Using the put command, you may simply transfer files from a local system to a remote system.

sftp> put localFile

To copy an entire directory will all of its files you can use, use this command:

sftp> put -r local-directory

If successful, the output will be displayed as follow:

Output
Uploading local-file to /home/{username}/local-file
local-file                                     100% 7607     7.4KB/s   00:00

Step 1&2 Alternative: Create a Variant via API

We provide another way to create a new product variant without importing the SFTP mapped file. To do that, you can use this endpoint: POST /https://api.cym.bio/v3/suppliers/{supplier_id}/variants here.

In your request, you need to provide the body value as per the previous format such as:

curl --request POST \
     --url https://api.cym.bio/v3/suppliers/{supplier_id}/variants \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --data '
{
     "sku": "string",
     "model": "string",
     "retail_price": 0,
     "wholesale_price": 0,
     "title": "string",
     "description": "string",
     "description_extra": "string",
     "upc": "string",
     "ean": "string",
     "id_in_source": "string",
     "weight": 0,
     "images": "string"
}
'

If it is successful, you will receive the 201 code response that shows your request has been successful.

Step 3: Upload All Products via API

The endpoint utilizes the POST method, allowing users to add files programmatically. Each file must conform to certain importing parameters. You will use SFTP as the protocol and push the file's URL.

You may use this endpoint: POST https://api.cym.bio/v3/suppliers/{supplier_id}/importProducts here.

In your request, you need to provide the body value as follows:

curl --request POST \
     --url https://api.cym.bio/v3/suppliers/{supplier_id}/importProducts \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --data '
{
     "file_url": "string",
     "data": [
          "string"
     ],
     "field_mapping": [
          "string"
     ],
     "math_transformer": "string"
}
'

If it is successful, you will receive the 201 code response that shows your request has been successful.

:email: Need help?

If you've run into an issue, please report it by emailing [email protected]. Include a description of the issue you're experiencing, provide steps to recreate it, and share the API call you did including the body/payload and the full responses that you received. A member of our team will reach out for additional info if needed.