POST /v3/returns/otc/start/details

Description - 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.

Purpose: Generate One-time codes for FEs who have reached the seller location and are on the Start OTC page.

Important

  • 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

Request and Response Parameters

☰ SHOW | HIDE

URL: https://api.flipkart.net/sellers/v3/returns/otc/start/details

Request Header Parameters

Parameter Type Requirement Description
Content-Type String Mandatory Must be application/json
Authorization String Mandatory Bearer token for authentication

Request Body Parameters

Parameter Type Requirement Description
sellerLocationId String Mandatory Seller location identifier
taskType String Mandatory Task type. Must be RETURN

Sample Request

{
  "sellerLocationId": "LOC1",
  "taskType": "RETURN"
}

Response Body Parameters (Success - 200 OK)

Parameter/Attribute Type Description
otcDetails Object OTC details for Field Executives
otcDetails.{feId} Object FE Identifier (key of the JSON Map), like fe12303, fe45601
otcDetails.{feId}.feName String Field Executive name
otcDetails.{feId}.taskId String Task identifier
otcDetails.{feId}.otc String One-time code
otcDetails.{feId}.expiryTime Long OTC expiry timestamp (Epoch format in milliseconds)
otcDetails.{feId}.createdAt Long OTC creation timestamp (Epoch format in milliseconds)
otcDetails.{feId}.logisticPartner String Logistics partner (e.g., eKart)
otcDetails.{feId}.lob String Line of Business. Values: LARGE or NONLARGE

Sample Response (Success - 200 OK)

{
  "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"
    }
  }
}

No OTC Generated Response (200 OK)

{
  "otcDetails": {}
}

Possible Error Response Codes

Error Codes Reason for Error
TRIPSHEET_TASK_NOT_FOUND No RETURN task found for seller
INVALID_TASK_TYPE_ERROR Task type is not Return
TRIPSHEET_CLOSED_ERROR Task is closed
UNAUTHORIZED_ERROR Authentication failed
INTERNAL_SERVER_ERROR Internal server error
BAD_GATEWAY_ERROR Bad gateway error
SERVICE_UNAVAILABLE_ERROR Service unavailable
GATEWAY_TIMEOUT_ERROR Gateway timeout