Blockstream Enterprise
ReferenceAPI ReferenceRecipients

Edit Recipients

Edit Recipients.

Request

RecipientsEditRequest
interface RecipientsEditRequest {
  action: 'edit'
  resource: string
  details: {
    name: string | undefined
    email: string | undefined
    description: string | undefined
    payment_details: {
      action: 'add'
      details: {
        name: string
        type: 'wallet' | 'address'
        value: string
      }
    } | { action: 'remove'; details: { id: string } } | { action: 'update'; details: { id: string; name: string | undefined; details: { type: 'wallet' | 'address'; value: string } | undefined } }[]
  }
}

Prop

Type

Response

RecipientsEditResponse_success
interface RecipientsEditResponse_success {
  status: 'success'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
  details: {
    id: string
    type: 'individual' | 'company'
    name: string
    email: string | undefined
    description: string | undefined
    payment_details: {
      id: string
      name: string
      type: 'wallet' | 'address'
      value: string
      created_at: string
      created_by: string
    } []
    recipient_groups: {
      id: string
      type: 'whitelist' | 'blacklist'
    } []
    created_at: string
    created_by: string
    updated_at: string
    updated_by: string
  }
  metadata: unknown
}

Prop

Type

RecipientsEditResponse_failed | pending | unauthorized | rejected
interface RecipientsEditResponse_failed | pending | unauthorized | rejected {
  status: 'failed' | 'pending' | 'unauthorized' | 'rejected'
  error_code?: '-1' | '-2' | '-3' | '-4' | '-5' | '-6' | '-7' | '-8' | '-9' | '-10' | '-11' | '-12' | '-13' | undefined
  message?: string | undefined
}

Prop

Type

Example

Example
import { resourceSchema } from '@blockstream/ecs-js-sdk'
import { broadcastRequest } from './broadcaster'

const response = await broadcastRequest<
  typeof resourceSchema.shape.recipients.shape.edit
>(
  {
    action: 'edit',
    resource: '/recipients/{id}',
    details: {
      // TODO: fill in required fields
    },
  },
  blockstream,
)

On this page