762

Step 1: Use Cymbio’s Inventory Template

First of all, make sure you use the inventory format according to the inventory template provided by Cymbio here.

❗️

Warning:

Please ensure that you fill each mandatory field.

Step 2: Send the inventory CSV via SFTP

Once you map your inventory details using our CSV template, you will push the inventory CSV via SFTP. SFTP is used to send inventory 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

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: Push Inventory in Bulk via Cymbio’s API

As an alternative, you can call this API to perform the programmatical file imports. The endpoint allows the user to update the supplier's variants simultaneously. 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}/importInventory 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/importInventory \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --data '
{
     "protocol": "string",
     "url": "string",
     "file_type": "csv",
     "amount_field": "string",
     "id_field": "string",
     "id_type": "sku",
     "warehouse_id": 0
}
'

If it is successful, you will receive the 200 code response to show that your request has been successful.

Step 3: Push Inventory via Our API

Call this API to manually create a new inventory (without importing SFTP mapped file). The warehouse's ID and inventories are ready to be updated (adjustable).

You may use this endpoint: POST https://api.cym.bio/v3/suppliers/{supplier_id}/inventory 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/inventory \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --data '
{
     "warehouse_id": "0",
     "id_type": "sku",
     "inventories": [
          "string"
     ]
}
'

If it is successful, you will receive the 200 code response to show that 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.