Skip to main content
PUT
/
instruments
/
action
Perform action on instrument(s)
curl --request PUT \
  --url https://api.lite.sa/v1/instruments/action \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "action_type": "BLOCK",
  "instrument_id": "550e8400-e29b-41d4-a716-446655440000"
}
'
import requests

url = "https://api.lite.sa/v1/instruments/action"

payload = {
"action_type": "BLOCK",
"instrument_id": "550e8400-e29b-41d4-a716-446655440000"
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}

response = requests.put(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({action_type: 'BLOCK', instrument_id: '550e8400-e29b-41d4-a716-446655440000'})
};

fetch('https://api.lite.sa/v1/instruments/action', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({action_type: 'BLOCK', instrument_id: '550e8400-e29b-41d4-a716-446655440000'})
};

fetch('https://api.lite.sa/v1/instruments/action', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.lite.sa/v1/instruments/action"

payload := strings.NewReader("{\n \"action_type\": \"BLOCK\",\n \"instrument_id\": \"550e8400-e29b-41d4-a716-446655440000\"\n}")

req, _ := http.NewRequest("PUT", url, payload)

req.Header.Add("x-api-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.lite.sa/v1/instruments/action",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'action_type' => 'BLOCK',
'instrument_id' => '550e8400-e29b-41d4-a716-446655440000'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <api-key>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
{
  "success": true,
  "message": "Action executed successfully"
}
{
"error": {
"code": "PAYMENT_DETAILS_MISMATCH",
"message": "The request was invalid or malformed",
"timestamp": "2024-12-16T10:30:00.000Z",
"details": {},
"correlationId": "550e8400-e29b-41d4-a716-446655440000"
}
}
{
"error": {
"code": "PAYMENT_DETAILS_MISMATCH",
"message": "The request was invalid or malformed",
"timestamp": "2024-12-16T10:30:00.000Z",
"details": {},
"correlationId": "550e8400-e29b-41d4-a716-446655440000"
}
}
{
"error": {
"code": "PAYMENT_DETAILS_MISMATCH",
"message": "The request was invalid or malformed",
"timestamp": "2024-12-16T10:30:00.000Z",
"details": {},
"correlationId": "550e8400-e29b-41d4-a716-446655440000"
}
}
{
"error": {
"code": "PAYMENT_DETAILS_MISMATCH",
"message": "The request was invalid or malformed",
"timestamp": "2024-12-16T10:30:00.000Z",
"details": {},
"correlationId": "550e8400-e29b-41d4-a716-446655440000"
}
}
{
"error": {
"code": "PAYMENT_DETAILS_MISMATCH",
"message": "The request was invalid or malformed",
"timestamp": "2024-12-16T10:30:00.000Z",
"details": {},
"correlationId": "550e8400-e29b-41d4-a716-446655440000"
}
}

Authorizations

x-api-key
string
header
required

API key for service-to-service or merchant authentication.

Headers

x-correlation-id
string<uuid>

Unique identifier for request tracing. Generated by the client or server if not provided.

Example:

"550e8400-e29b-41d4-a716-446655440000"

x-idempotency-key
string<uuid>

Unique key for idempotent request processing. Duplicate requests with the same key are safely ignored.

Example:

"baf6a8e2-0c89-46ef-9ca5-faa65b99bcd5"

Body

application/json

Instrument action data

Perform action on a specific instrument

action_type
required

Block the instrument from use

Allowed value: "BLOCK"
Example:

"BLOCK"

instrument_id
string<uuid>
required

Specific instrument ID to perform the action on

Example:

"550e8400-e29b-41d4-a716-446655440000"

Response

Instrument action completed successfully.

Instrument action result

success
boolean
required

Whether the action was executed successfully

Example:

true

message
string
required

Human-readable result message

Example:

"Action executed successfully"