Close
logo

Adding Vendor Emails

Git RepositoryEdit on Github
Last update: a year ago by Francesco de LorenziReading time: 2 min

One of the key aspects of the Dropship Provider configuration is the Vendor Email Address Set-Up.

Vendor Account Set-Up

During vendor onboarding, according to the type of setup, the dropship provider's staff is invited to access the Vendor Portal. This operation can also be carried out programmatically by calling the /api/users.json via a POST call. Relevant documentation on the accepted payload is available via Jetti's API documentation

Here is an example cURL request to create a new vendor user account.

curl --request POST \
--url 'https://api.jetti.io/api/users.json' \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
"bypass":false,
"dropshipProviderId":id,
"role":"dropship_provider",
"shippingNotifications":true,
"email":"email@domain.com"
}'

shippingNotifications : Notification emails will be sent whenever a new order is raised.

email : Vendor Email Address

dropshipProviderId : Id of the Dropship Provider

You may obtain dropshipProviderId by extracting the id from the URL in Jetti's app (e.g. https://app.jetti.io/dropship-providers/:id) or getting a dropship provider list via Jetti's API.

Among the several fields that will be returned as a JSON response from Jetti's API, it may be important to save the value stored in the id field. This could be used to further customize the vendor user.

Invitation Email Submission

Once the account is created, next step is to send an invitation link to the vendor's email address.

To do so, you need to make a PUT call to /api/dropship-providers/:id/invite.json by making sure to replace id with the Dropship Provider Id from the previous API call.

Here is the sample cURL request.

curl --request PUT \
--url https://api.jetti.io/api/dropship-providers/:id/invite.json \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{
"email":"email@domain.com",
"orderSetupStatus":"pending",
"inventorySetupStatus":"complete",
"shippingSetupStatus":"pending",
"paymentSetupStatus":"pending",
"dropshipProviderInvitationSubject":"Set up {vendorName} dropship portal for {companyName}.",
"dropshipProviderInvitationMessage":"Hi!\n\nA dropship portal on {companyName} has been set up for you. You can find the login link at the bottom of the email.\n\n- Once you'\''re signed in, you'\''ll be able to click on the *Change login* link to set a different email or password.\n- If you need to add or confirm any other details (e.g. set up your payment details), you'\''ll see a red alert at the top of the page.\n- Please get in touch with your merchant if you have any questions. The [Jetti support team](https://jetti.io/support) team can also help with technical questions if need.\n\nAlso, check out the [getting started guide](https://jetti.io/support/vendor-onboarding/a-vendors-perspective-on-dropshipping/) If you need any help understand how the Jetti setup process works, and how drop shipping with your merchants could be the key to your business’s future success.\n\nPowered by [Jetti.io](https://jetti.io)"
}'

The dropshipProviderInvitationMessage email body message field supports the Markdown syntax.

Vendor Account Password Set-Up

As an alternative to inviting the vendor to configure the account, you may also wish to set a password programmatically. In order to do so, you will need to retrieve the vendor user id that you saved while creating the account.

Once that is done, you can make a PUT call to /api/users/:id/save-password.json as shown in the cURL request below:

curl --request PUT \
--url https://api.jetti.io/api/users/:id/save-password.json \
--header 'Authorization: Bearer {{token}}' \
--header 'Content-Type: application/json' \
--data '{"password": "password"}'
⌨️ Dropship Providers — Previous
Creating Inventory Feeds
Next — ⌨️ Dropship Providers
Creating Dropship Provider Addresses