Change vendor user's customer list
Before you try this endpoint, please confirm you already get auth token from the endpoint Get auth token.
When you run this api with your authorization, the backend will check if you are a vendor user with vendor portal access.
This endpoint is used to change vendor user's customer list. the new customer list will overwrite old customer list.
Assign customer to a vendor
POST /vendor/assign_customer
Headers
Name
Value
Content-Type
application/json
Authorization
Bearer <token>
Body
Name
Type
Required
Description
email
string
Email of the vendor user
customer_list
list of number
A list of customer id
Parameter Example
{
"email": "[email protected]",
"customer_list": [1,2]
}Response
{
"id": 1936,
"access_vendor_portal": false,
"name": "Vendor user 2",
"platform_email": "[email protected]",
"customer_list": [
{
"id": 1,
"name": "Test Customer 1",
"is_active": true
}
]
}//if auth user don't have vendor portal access or auth user is not a vendor user
{"code":"ERROR_FATAL","message":"Access Denied","payload":""}
{
"error": "Invalid request"
}Last updated