Creating Dropship Providers

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

Marketplaces may feel the need to onboard several dropship providers and this operation may require a few steps via Onport’s UI.

Namely, it is necessary to create the dropship provider and then configure one or more inventory feeds, if applicable.

In custom integration scenarios, this operation can be automated by interacting with Onport’s API.

In order to prepare the call, make sure to obtain the API Token from Onport’s app by clicking Integrations -> API.

The endpoint to call to create a new dropship provider is /api/dropship-providers.json. The method to be used is POST. Onport expects a JSON payload, as described in the API Reference.

As opposed to passing a full payload, when making a POST call, you can also choose the fields you wish to populate.

Here is an example cURL request you can make to create a new dropship provider named Test Dropship 1.

curl --request POST \
--url \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{"name":"Test Dropship 1"}'

This will return a full JSON response with all the fields prepopulated. If you wish to edit the Dropship provider name, you will need to collect the id of the resource from the API response.

Once that is done, just prepare the following cURL request by replacing the id in the URL and the token.

curl --request PUT \
--url \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{"name":"Test Dropship 2"}'

Jetti’s API will respond with the full object containing the updated information.

📦 Custom Carrier — Previous
Providing Tracking Information
Next — ⌨️ Dropship Providers
Getting Dropship Provider Settings