Start OTC Details
POST /sellers/v3/returns/otc/start/details
The Start OTC API serves the same purpose as the Generate Start OTC button on the FK Seller Hub. On hitting the API, the FEs who have reached the location, along with their Start OTCs, are returned in response. The API generates One-time codes for FEs who have reached the seller location and are on the Start OTC page. OTCs are generated ONLY for FEs who have reached the seller location and are on the Start OTC page. Each OTC has an expiry time and must be used before expiration. If no FEs are on the Start OTC page, otcDetails will be empty.
- application/json
Request Body required
Request body for start OTC details
- sellerLocationId string required
Seller location identifier
- taskType string required
Possible values: [
RETURN]Task type - must be RETURN
- 200
- 400
- 401
- 500
- 502
- 503
- 504
successful operation
- application/json
- Schema
- Example (from schema)
Schema
otcDetails object
OTC details mapped by feId. Will be empty if no FEs are on the Start OTC page
property name* object (OtcDetail)
feName stringField Executive name
taskId stringTask identifier
otc stringOne-time code
expiryTime int64OTC expiry timestamp (Epoch format in milliseconds)
createdAt int64OTC creation timestamp (Epoch format in milliseconds)
logisticPartner stringLogistics partner name
lob stringPossible values: [
LARGE,NONLARGE]Line of Business
{
"otcDetails": {
"fe12303": {
"feName": "Ram",
"taskId": "123",
"otc": "123456",
"expiryTime": 1739382981,
"createdAt": 1739382981,
"logisticPartner": "eKart",
"lob": "LARGE | NONLARGE"
},
"fe45601": {
"feName": "Shyam",
"taskId": "456",
"otc": "567890",
"expiryTime": 1739382981,
"createdAt": 1739382981,
"logisticPartner": "eKart",
"lob": "LARGE | NONLARGE"
}
}
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
- errorCode string
Possible values: [
TRIPSHEET_TASK_NOT_FOUND,INVALID_TASK_TYPE_ERROR,TRIPSHEET_CLOSED_ERROR,UNAUTHORIZED_ERROR,INTERNAL_SERVER_ERROR,BAD_GATEWAY_ERROR,SERVICE_UNAVAILABLE_ERROR,GATEWAY_TIMEOUT_ERROR]Error code
- message string
Error message
{
"errorCode": "TRIPSHEET_TASK_NOT_FOUND",
"message": "string"
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
- errorCode string
Possible values: [
TRIPSHEET_TASK_NOT_FOUND,INVALID_TASK_TYPE_ERROR,TRIPSHEET_CLOSED_ERROR,UNAUTHORIZED_ERROR,INTERNAL_SERVER_ERROR,BAD_GATEWAY_ERROR,SERVICE_UNAVAILABLE_ERROR,GATEWAY_TIMEOUT_ERROR]Error code
- message string
Error message
{
"errorCode": "TRIPSHEET_TASK_NOT_FOUND",
"message": "string"
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
Schema
- errorCode string
Possible values: [
TRIPSHEET_TASK_NOT_FOUND,INVALID_TASK_TYPE_ERROR,TRIPSHEET_CLOSED_ERROR,UNAUTHORIZED_ERROR,INTERNAL_SERVER_ERROR,BAD_GATEWAY_ERROR,SERVICE_UNAVAILABLE_ERROR,GATEWAY_TIMEOUT_ERROR]Error code
- message string
Error message
{
"errorCode": "TRIPSHEET_TASK_NOT_FOUND",
"message": "string"
}
Bad Gateway
- application/json
- Schema
- Example (from schema)
Schema
- errorCode string
Possible values: [
TRIPSHEET_TASK_NOT_FOUND,INVALID_TASK_TYPE_ERROR,TRIPSHEET_CLOSED_ERROR,UNAUTHORIZED_ERROR,INTERNAL_SERVER_ERROR,BAD_GATEWAY_ERROR,SERVICE_UNAVAILABLE_ERROR,GATEWAY_TIMEOUT_ERROR]Error code
- message string
Error message
{
"errorCode": "TRIPSHEET_TASK_NOT_FOUND",
"message": "string"
}
Service Unavailable
- application/json
- Schema
- Example (from schema)
Schema
- errorCode string
Possible values: [
TRIPSHEET_TASK_NOT_FOUND,INVALID_TASK_TYPE_ERROR,TRIPSHEET_CLOSED_ERROR,UNAUTHORIZED_ERROR,INTERNAL_SERVER_ERROR,BAD_GATEWAY_ERROR,SERVICE_UNAVAILABLE_ERROR,GATEWAY_TIMEOUT_ERROR]Error code
- message string
Error message
{
"errorCode": "TRIPSHEET_TASK_NOT_FOUND",
"message": "string"
}
Gateway Timeout
- application/json
- Schema
- Example (from schema)
Schema
- errorCode string
Possible values: [
TRIPSHEET_TASK_NOT_FOUND,INVALID_TASK_TYPE_ERROR,TRIPSHEET_CLOSED_ERROR,UNAUTHORIZED_ERROR,INTERNAL_SERVER_ERROR,BAD_GATEWAY_ERROR,SERVICE_UNAVAILABLE_ERROR,GATEWAY_TIMEOUT_ERROR]Error code
- message string
Error message
{
"errorCode": "TRIPSHEET_TASK_NOT_FOUND",
"message": "string"
}