Close
logo

Creating Inventory Feeds

Git RepositoryEdit on Github
Last update: 2 years ago by luigi mangaReading time: 2 min

As part of our journey to manage dropship providers and inventory feeds programmatically, this article focuses on how to create an inventory feed via Onport's API.

The specific endpoint to be used is https://api.jetti.io/api/inventory-feeds.json and it accepts POST calls to create a new Inventory Feed. In order to do so, it is important to know the dropshipProviderId the inventory feed will be tied to. You may obtain this id by extracting it from the URL in Onport's app (e.g. https://app.jetti.io/dropship-providers/:id) or getting a dropship provider list via Onport's API.

Once the dropshipProviderId is collected, you can proceed with preparing the JSON payload. Relevant documentation on the accepted payload is available via Jetti's API documentation

For demonstration purposes, the following payload will show how to create an FTP/HTTPS Inventory Feed. It is possible to change the resourceType field value to handle other Inventory Feed types.

curl --request POST \
--url https://api.jetti.io/api/inventory-feeds.json \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
"automaticallyConnect":false,
"publishProducts":true,
"syncPricing":true,
"syncAllPriceLists":true,
"syncWeight":true,
"syncImages":false,
"syncOptions":true,
"syncDescription":false,
"syncName":false,
"syncProductType":true,
"dropshipProviderId":"id",
"name":"Test Dropship 2",
"resourceLocation":"https://www.domain.com/path/to/file.csv",
"resourceType":"ftpCsv",
"tags":[
"Test Dropship 3"
],
"vendorName":"Test Dropship 3",
"delimiter":","
}'

It is important to customize the dropshipProviderId , resourceLocation, tags and name fields by entering the relevant information. As for the resourceLocation, Onport fully supports password protected resources, according to the RFC 1738 specifications.

Here are some example URLs Onport supports:

http://username:password@host/path/to/file.csv
https://username:password@host/path/to/file.csv
ftp://username:password@host/path/to/file.csv
ftps://username:password@host/path/to/file.csv
โŒจ๏ธ Dropship Providers โ€” Previous
Getting Dropship Provider Settings
Next โ€” โŒจ๏ธ Dropship Providers
Adding Vendor Emails