Update User Service
PUT /api/v1/users/{userId}/service
Description
Update a user's service details.
Path Parameters
| Name | Type | Description |
|---|---|---|
userId | string | The user ID (path) |
Request Headers
| Name | Type | Description |
|---|---|---|
service-api-key | string | The service API key (header) |
service-api-code | string | The service API code (header) |
Request Body
- Content Type:
application/json
{
"userId": "string",
"firstName": "string",
"lastName": "string",
"middleName": "string",
"photo": "string",
"phone": "string",
"alternatePhone": "string",
"dob": "string",
"gender": "MALE",
"country": {
"name": "string",
"code": "string",
"currency": "string"
},
"state": {
"name": "string",
"code": "string"
},
"city": {
"name": "string",
"code": "string"
},
"address": "string",
"foreignerCountry": {
"name": "string",
"code": "string",
"currency": "string"
},
"foreignerState": {
"name": "string",
"code": "string"
},
"foreignerCity": {
"name": "string",
"code": "string"
},
"actionBy": "string",
"bvn": "string",
"proofOfAddress": "string",
"nin": "string",
"driversLicense": "string",
"voterCard": "string",
"passportNumber": "string",
"identityType": "string",
"identityDoc": "string",
"isDistributor": false,
"isManufacturer": false,
"latitude": 0,
"longitude": 0,
"appViewSource": "TRACE",
"appViewType": "NONE",
"referralName": "string",
"referralPhone": "string",
"metadata": {
"qualityRecordOfCrop": "string",
"essentialCertification": [
{
"certificateName": "string",
"docLinks": [
{
"link": "string",
"name": "string"
}
]
}
],
"noOfarmerInCluster": 0,
"familySizeOfarmer": 0,
"challengesOrNeeds": "string",
"farmSize": 0,
"harvestingAndPostHarvestingService": "string",
"farmLabourPractices": "string",
"environmentalPractices": "string",
"farmClusterInformation": "string",
"targetQuantityPerCycle": "string",
"qualityAndQuantityRecords": "string"
},
"commodityActiveTraderStatus": "PLATFORM_GLOBAL",
"source": "SHOP"
}
Response Code: 200 - OK
Description
User service updated successfully.
Response Fields
| Field | Type | Description |
|---|---|---|
| status | boolean | Indicates if the operation was successful |
| statusCode | integer | Status code |
| message | string | Response message |
| data | object | Data related to the updated user service |
| errors | array | List of error messages, if any |
Example
{
"status": true,
"statusCode": 0,
"message": "User service updated successfully",
"data": {},
"errors": [
{
"message": "Some error occurred",
"descriptiveMessage": "Detailed error message"
}
]
}
Method: PUT
>http://your-api-url/api/v1/users/{userId}/service
Headers
| Content-Type | Value |
|---|---|
| apiKey | {{apiKey}} |
| service-api-key | string |
| service-api-code | string |
Body
{
"userId": "usr123",
"firstName": "John",
"lastName": "Doe",
"middleName": "M",
"photo": "http://example.com/photo.jpg",
"phone": "9876543210",
"alternatePhone": "1234567890",
"dob": "1990-01-01",
"gender": "MALE",
"country": {
"name": "CountryName",
"code": "CN",
"currency": "CurrencyName"
},
"state": {
"name": "StateName",
"code": "ST"
},
"city": {
"name": "CityName",
"code": "CT"
},
"address": "123 Street Name",
"foreignerCountry": {
"name": "ForeignCountryName",
"code": "FC",
"currency": "ForeignCurrency"
},
"foreignerState": {
"name": "ForeignStateName",
"code": "FS"
},
"foreignerCity": {
"name": "ForeignCityName",
"code": "FC"
},
"actionBy": "Admin",
"bvn": "12345678901",
"proofOfAddress": "http://example.com/proof.jpg",
"nin": "123456789",
"driversLicense": "DL123456",
"voterCard": "VC123456",
"passportNumber": "P1234567",
"identityType": "Passport",
"identityDoc": "http://example.com/identity.jpg",
"isDistributor":
LANGUAGE
CURL REQUEST
curl --request PUT \
--url /api/v1/users/{userId}/service \
--header 'accept: application/json' \
--header 'content-type: application/json'
RESPONSE
Click Try It! to start a request and see the response here!