Skip to content

Update Pocket

Request

Update a Pocket's name, or update a Pocket's status. If the intent is to close a Pocket, then there are two requirements: The Pocket needs to be empty, and there has to be at least one other open Pocket belonging to the customer. Additionally, when you close a Pocket, you also need to pass a closure_reason along with the status update.

Security
HTTPBearer
Path
customer_idstring, (uuid)(Customer Id)required
pocket_idstring, (uuid)(Pocket Id)required
Headers
x-jiko-idempotencystring, (uuid)(X-Jiko-Idempotency)required

A new UUID that you generate for each request, reads included. It is part of the request signature and prevents replay of a request. A value that was already sent in the last hour is rejected with 409 jiko.errors.DuplicateRequestError, even if the first request failed. When you retry a request, generate a new value and sign the request again.

x-jiko-signaturestring(X-Jiko-Signature)required

Base64-encoded HMAC-SHA256 hash of x-jiko-idempotency + request pathname + body, keyed with your shared secret. See Authentication for the full algorithm and a code sample.

Bodyapplication/jsonrequired
pocket_namestring or null(Pocket Name)
Any of:

Pocket name

<= 100 characters
string
statusstring or null(Status)
Any of:

Pocket status

string(CLOSED)
closure_reasonstring or null(Closure Reason)
Any of:
string
Enum:"PARTNER_INSTIGATED""USER_INSTIGATED""INACTIVITY""SUSPICIOUS_ACTIVITY"
deposit_strategy_idCreatePocketConfigurationId (string) or null
Any of:

Pocket deposit trading strategy ID (Example: UST-4W)

string(CreatePocketConfigurationId)
Enum:"UST-52W""UST-26W""UST-13W""UST-4W""UST-1W"
reinvestment_strategy_idCreatePocketConfigurationId (string) or null
Any of:

Pocket reinvestment trading strategy ID (Example: UST-4W)

string(CreatePocketConfigurationId)
Enum:"UST-52W""UST-26W""UST-13W""UST-4W""UST-1W"
curl -i -X PATCH \
  'https://your-partner-name.sandbox-api.jikoservices.com/api/v2/customers/{customer_id}/pockets/{pocket_id}/' \
  -H 'Authorization: Bearer <YOUR_TOKEN_HERE>' \
  -H 'Content-Type: application/json' \
  -H 'x-jiko-idempotency: 497f6eca-6276-4993-bfeb-53cbbbba6f08' \
  -H 'x-jiko-signature: string' \
  -d '{
    "pocket_name": "Savings"
  }'

Responses

Successful Response

Bodyapplication/json
idstring, (uuid)(Id)required

ID of the pocket

pocket_namestring(Pocket Name)required

Pocket name

portfolioPortfolio (object) or null
Any of:

Total liquid cash and holdings

statusstring(Status)required

Pocket status

Enum:"PENDING""OPEN""FROZEN""CLOSED"
attributesArray of strings(Attributes)
deposit_strategy_idstring(Deposit Strategy Id)required

Pocket deposit trading strategy ID (Example: UST-4W)

reinvestment_strategy_idstring or null(Reinvestment Strategy Id)required
Any of:

Pocket reinvestment trading strategy ID (Example: UST-4W)

string
typestring or null(Type)
Any of:

Pocket type

string
Enum:"JIKO_PAY""JIKO_STORE"
object_typestring(Object Type)read-onlyrequired
Response
{ "id": "d0e1dd1b-3e21-4cd4-9872-f71ea4967ffd", "pocket_name": "4-week T-bills", "status": "OPEN", "attributes": [], "deposit_strategy_id": "UST-4W", "reinvestment_strategy_id": "UST-26W", "customer_id": "62c5272e-ef8c-4d8a-a49d-633432409fd4", "object_type": "CustomerPocket" }