pocketful logo light
pocketful logo light

Rename Basket

This method is used to rename the existing basket.

Endpoint: api/v1/basket
Method-Type: PUT

Request Packet

{
  "basket_id":"9cd5fbc3-333b-4934-8d45-e692349b5ede",
  "name":"Basket2"
}

Parameters

FieldNameDatatypeDescription
basket_idStringRepresents the unique id of the basket.
nameStringRepresents the name of the basket.

Example

response = pocket.renameBasket(
  {
    "basket_id":"9cd5fbc3-333b-4934-8d45-e692349b5ede",
    "name":"Basket2"
    }
)

Response

{
  "data": 
  {
    "basket_id": "9cd5fbc3-333b-4934-8d45-e692349b5ede",
    "basket_type": "NORMAL",
    "is_executed": false,
    "login_id": "<client id>",
    "name": "Basket2",
    "order_type": "LIMIT",
    "orders": [],
    "product_type": "ALL",
    "sip_eligible": true,
    "sip_enabled": false
         },
    "message": "Basket name updated successfully", 
    "status": "success"
}
Field NameDescription
basket_idUnique identifier for the basket.
basket_typeType of the basket.
is_executedIndicates whether the basket has been executed.
login_idIdentifier for the user’s login.
nameName of the basket.
order_typeType of orders in the basket.
ordersList of orders in the basket.
product_typeType of product.
sip_eligibleIndicates if SIP (Systematic Investment Plan) is eligible for the basket.
sip_enabledIndicates if SIP (Systematic Investment Plan) is enabled for the basket.
messageInformation message related to the operation performed on the basket.
statusStatus of the operation performed on the basket.

Error Response

{
  "data": {},
  "error_code": 48001,
  "message": "`name` Basket name restricted to 20 characters",
  "status": "error"
}