curl --request POST \
--url 'https://transaction-tax.api.in.commenda.io/api/v1/credentials/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
--data '{
"corporation_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "California CDTFA Portal (Updated)",
"blocks": [
{
"id": "block-uuid-1",
"block_key": "username",
"block_label": "Username",
"block_type": "String",
"value": "new-user@example.com"
}
]
}'
{
"corporation_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "California CDTFA Portal (Updated)",
"blocks": [
{
"id": "block-uuid-1",
"block_key": "username",
"block_label": "Username",
"block_type": "String",
"value": "new-user@example.com"
}
]
}
{
"corporation_id": "550e8400-e29b-41d4-a716-446655440000",
"blocks_to_delete": ["block-uuid-2"]
}
{
"message": "Successfully updated credential.",
"data": {
"credential": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"updated_at": "2024-02-01T14:00:00Z"
}
}
}
{
"error": {
"type": "CREDENTIAL_NOT_FOUND",
"title": "Credential not found.",
"detail": {
"description": "The credential does not exist or you don't have access."
},
"status": 404,
"instance": "/api/v1/credentials/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
Credentials
Update credential
Update an existing credential and its blocks
POST
/
api
/
v1
/
credentials
/
{id}
curl --request POST \
--url 'https://transaction-tax.api.in.commenda.io/api/v1/credentials/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
--data '{
"corporation_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "California CDTFA Portal (Updated)",
"blocks": [
{
"id": "block-uuid-1",
"block_key": "username",
"block_label": "Username",
"block_type": "String",
"value": "new-user@example.com"
}
]
}'
{
"corporation_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "California CDTFA Portal (Updated)",
"blocks": [
{
"id": "block-uuid-1",
"block_key": "username",
"block_label": "Username",
"block_type": "String",
"value": "new-user@example.com"
}
]
}
{
"corporation_id": "550e8400-e29b-41d4-a716-446655440000",
"blocks_to_delete": ["block-uuid-2"]
}
{
"message": "Successfully updated credential.",
"data": {
"credential": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"updated_at": "2024-02-01T14:00:00Z"
}
}
}
{
"error": {
"type": "CREDENTIAL_NOT_FOUND",
"title": "Credential not found.",
"detail": {
"description": "The credential does not exist or you don't have access."
},
"status": 404,
"instance": "/api/v1/credentials/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
Update a credential’s details and blocks. You can add new blocks, update existing ones, and delete blocks by ID.
Path parameters
string
required
The unique identifier (UUID) of the credential to update.
Request body
string
required
The unique identifier (UUID) for the corporation.
string
The portal ID to associate the credential with.
string
Updated display name.
string
Updated portal URL.
string
Updated notes.
string
Updated status. Values:
ACTIVE, EXPIRED.array
Array of blocks to add or update. Each block requires
block_key, block_label, block_type, and value. Include id for existing blocks to update them; omit id to create new blocks.array
Array of block IDs to delete from this credential.
curl --request POST \
--url 'https://transaction-tax.api.in.commenda.io/api/v1/credentials/a1b2c3d4-e5f6-7890-abcd-ef1234567890' \
--header 'Authorization: Bearer <your_token>' \
--header 'Content-Type: application/json' \
--data '{
"corporation_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "California CDTFA Portal (Updated)",
"blocks": [
{
"id": "block-uuid-1",
"block_key": "username",
"block_label": "Username",
"block_type": "String",
"value": "new-user@example.com"
}
]
}'
{
"corporation_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "California CDTFA Portal (Updated)",
"blocks": [
{
"id": "block-uuid-1",
"block_key": "username",
"block_label": "Username",
"block_type": "String",
"value": "new-user@example.com"
}
]
}
{
"corporation_id": "550e8400-e29b-41d4-a716-446655440000",
"blocks_to_delete": ["block-uuid-2"]
}
{
"message": "Successfully updated credential.",
"data": {
"credential": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"updated_at": "2024-02-01T14:00:00Z"
}
}
}
{
"error": {
"type": "CREDENTIAL_NOT_FOUND",
"title": "Credential not found.",
"detail": {
"description": "The credential does not exist or you don't have access."
},
"status": 404,
"instance": "/api/v1/credentials/a1b2c3d4-e5f6-7890-abcd-ef1234567890"
}
}
Was this page helpful?