End OTC Details
POST /sellers/v3/returns/otc/end/details
When the Generate End OTC is clicked, the summary of the scanned shipments with statistics, as well as the End OTC, is shown. The same information can be fetched using the End OTC API as well. After the End OTC has been verified by the FE, the returnCompleted order event notification will get pushed by the Order Management Notification Service. All shipments must be synced before ending End OTC. Shipment scanning API (POST /v3/returns/tasks/shipments) must be called at least once before calling End OTC API. FE must be on the End OTC page (not actively scanning). FE cannot go back from End OTC to Scanning again.
- application/json
Request Body required
Request body for end OTC details
- feId string required
Field Executive identifier
- taskId string required
Task 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
- otc string
One-time code
- totalScanned integer
Total shipments scanned
- obdEligible integer
OBD eligible shipments
- obdFailed integer
OBD failed shipments
- flyerEligible integer
Flyer eligible shipments
- flyerFailed integer
Flyer failed shipments
{
"otc": "123456",
"totalScanned": 120,
"obdEligible": 15,
"obdFailed": 2,
"flyerEligible": 12,
"flyerFailed": 1
}
Bad Request
- application/json
- Schema
- Example (from schema)
Schema
- errorCode string
Possible values: [
SHIPMENT_SYNC_ERROR,NOT_ON_END_OTC_PAGE_ERROR,TRIPSHEET_TASK_NOT_FOUND,INVALID_TASK_TYPE_ERROR,FE_OTC_BAD_REQUEST_ERROR,UNAUTHORIZED_ERROR,INTERNAL_SERVER_ERROR,BAD_GATEWAY_ERROR,SERVICE_UNAVAILABLE_ERROR,GATEWAY_TIMEOUT_ERROR]Error code
- message string
Error message
{
"errorCode": "SHIPMENT_SYNC_ERROR",
"message": "string"
}
Unauthorized
- application/json
- Schema
- Example (from schema)
Schema
- errorCode string
Possible values: [
SHIPMENT_SYNC_ERROR,NOT_ON_END_OTC_PAGE_ERROR,TRIPSHEET_TASK_NOT_FOUND,INVALID_TASK_TYPE_ERROR,FE_OTC_BAD_REQUEST_ERROR,UNAUTHORIZED_ERROR,INTERNAL_SERVER_ERROR,BAD_GATEWAY_ERROR,SERVICE_UNAVAILABLE_ERROR,GATEWAY_TIMEOUT_ERROR]Error code
- message string
Error message
{
"errorCode": "SHIPMENT_SYNC_ERROR",
"message": "string"
}
Internal Server Error
- application/json
- Schema
- Example (from schema)
Schema
- errorCode string
Possible values: [
SHIPMENT_SYNC_ERROR,NOT_ON_END_OTC_PAGE_ERROR,TRIPSHEET_TASK_NOT_FOUND,INVALID_TASK_TYPE_ERROR,FE_OTC_BAD_REQUEST_ERROR,UNAUTHORIZED_ERROR,INTERNAL_SERVER_ERROR,BAD_GATEWAY_ERROR,SERVICE_UNAVAILABLE_ERROR,GATEWAY_TIMEOUT_ERROR]Error code
- message string
Error message
{
"errorCode": "SHIPMENT_SYNC_ERROR",
"message": "string"
}
Bad Gateway
- application/json
- Schema
- Example (from schema)
Schema
- errorCode string
Possible values: [
SHIPMENT_SYNC_ERROR,NOT_ON_END_OTC_PAGE_ERROR,TRIPSHEET_TASK_NOT_FOUND,INVALID_TASK_TYPE_ERROR,FE_OTC_BAD_REQUEST_ERROR,UNAUTHORIZED_ERROR,INTERNAL_SERVER_ERROR,BAD_GATEWAY_ERROR,SERVICE_UNAVAILABLE_ERROR,GATEWAY_TIMEOUT_ERROR]Error code
- message string
Error message
{
"errorCode": "SHIPMENT_SYNC_ERROR",
"message": "string"
}
Service Unavailable
- application/json
- Schema
- Example (from schema)
Schema
- errorCode string
Possible values: [
SHIPMENT_SYNC_ERROR,NOT_ON_END_OTC_PAGE_ERROR,TRIPSHEET_TASK_NOT_FOUND,INVALID_TASK_TYPE_ERROR,FE_OTC_BAD_REQUEST_ERROR,UNAUTHORIZED_ERROR,INTERNAL_SERVER_ERROR,BAD_GATEWAY_ERROR,SERVICE_UNAVAILABLE_ERROR,GATEWAY_TIMEOUT_ERROR]Error code
- message string
Error message
{
"errorCode": "SHIPMENT_SYNC_ERROR",
"message": "string"
}
Gateway Timeout
- application/json
- Schema
- Example (from schema)
Schema
- errorCode string
Possible values: [
SHIPMENT_SYNC_ERROR,NOT_ON_END_OTC_PAGE_ERROR,TRIPSHEET_TASK_NOT_FOUND,INVALID_TASK_TYPE_ERROR,FE_OTC_BAD_REQUEST_ERROR,UNAUTHORIZED_ERROR,INTERNAL_SERVER_ERROR,BAD_GATEWAY_ERROR,SERVICE_UNAVAILABLE_ERROR,GATEWAY_TIMEOUT_ERROR]Error code
- message string
Error message
{
"errorCode": "SHIPMENT_SYNC_ERROR",
"message": "string"
}