API Docs Help

Recipient Internal

Recipient Internal Communication API (proto file)

This document describes the gRPC API defined in the recipient_internal.proto file for recipient-related internal communication functionalities.

Dependencies

  • google/protobuf/empty.proto: Used for empty response messages.

  • recipient_common.proto: Likely defines shared message types used across other services.

Services

The RecipientInternalService offers gRPC methods for managing recipient information and invoices.

Functions:

  1. LinkRecipientToInvoice: Links a specified Recipient (identified by recipientId within a recipientGroupId) to an Invoice within a particular companyId. The linked RecipientGroup is returned in the response.

  2. UnlinkRecipientFromInvoice: Removes the link between a Recipient and an Invoice based on provided IDs and companyId. Returns an empty message on success.

  3. UnlinkRecipientsFromInvoices: Unlinks multiple Recipients from their respective Invoices within a specified companyId. IDs of involved RecipientGroups and Recipients are provided in separate lists. Returns an empty message on success.

  4. MatchRecipients: Matches Recipients based on criteria provided in a MatchRecipientsRequest. Returns a RecipientGroupsResponse containing matching RecipientGroup information.

  5. GetRecipientGroupById: Retrieves a specific RecipientGroup by its unique id.

  6. GetRecipientGroupByInternalNumber: Retrieves a RecipientGroup based on its internalNumber.

  7. GetRecipientById: Retrieves a specific Recipient by its unique id.

  8. GetRecipientGroups: Retrieves a list of RecipientGroups matching provided IDs or containing specified Recipients.

  9. GetRecipients: Retrieves a list of Recipients matching provided IDs.

Messages

LinkRecipientToInvoiceRequest:

  • recipientGroupId: Unique identifier of the RecipientGroup the Recipient belongs to.

  • recipientId: Unique identifier of the Recipient to be linked.

  • companyId: Identifier of the company the Invoice belongs to.

  • oldRecipientGroupId: (Optional) ID of the previously linked RecipientGroup (if applicable).

  • oldRecipientId: (Optional) ID of the previously linked Recipient (if applicable).

UnlinkRecipientFromInvoiceRequest:

  • recipientGroupId: Unique identifier of the RecipientGroup containing the Recipient to be unlinked.

  • recipientId: Unique identifier of the Recipient to be unlinked.

  • companyId: Identifier of the company the Invoice belongs to.

UnlinkRecipientsFromInvoicesRequest:

  • recipientGroupIds: List of IDs for the RecipientGroups containing the Recipients to be unlinked.

  • recipientIds: List of IDs for the specific Recipients to be unlinked.

  • companyId: Identifier of the company where the linked Invoices reside.

GetRecipientGroupsRequest:

  • recipientGroupIds: (Optional) List of IDs for the specific RecipientGroups to be retrieved.

  • recipientIds: (Optional) List of IDs for Recipients whose containing RecipientGroups should be retrieved.

GetRecipientsRequest:

  • ids: List of IDs for the specific Recipients to be retrieved.

RecipientsResponse:

  • recipients: List of matching Recipient objects as per the request.

GetRecipientGroupByInternalNumberRequest:

  • internalNumber: Internal identification number of the RecipientGroup to be retrieved.

RecipientGroup:

  • (Definition likely resides in recipient_common.proto)

  • Represents a recipient group entity with relevant attributes.

RecipientGroupsResponse:

  • recipientGroups: List of matching RecipientGroup objects as per the request.

Proto Definition (Markdown format)

syntax = "proto3"; package ai.pedant.srv.entity; option java_package = "ai.pedant.srv.entity"; option go_package = "pedant.ai/pedant-main-service/grpc-gateway"; import "google/protobuf/empty.proto"; import "recipient_common.proto"; service RecipientInternalService { rpc LinkRecipientToInvoice (LinkRecipientToInvoiceRequest) returns (RecipientGroup); rpc UnlinkRecipientFromInvoice (UnlinkRecipientFromInvoiceRequest) returns (google.protobuf.Empty); rpc UnlinkRecipientsFromInvoices (UnlinkRecipientsFromInvoicesRequest) returns (google.protobuf.Empty); rpc MatchRecipients (MatchRecipientsRequest) returns (RecipientGroupsResponse); rpc GetRecipientGroupById (GetRecipientGroupByIdRequest) returns (RecipientGroup); rpc GetRecipientGroupByInternalNumber (GetRecipientGroupByInternalNumberRequest) returns (RecipientGroup); rpc GetRecipientById (GetRecipientByIdRequest) returns (Recipient); rpc GetRecipientGroups (GetRecipientGroupsRequest) returns (RecipientGroupsResponse); rpc GetRecipients (GetRecipientsRequest) returns (RecipientsResponse); } message LinkRecipientToInvoiceRequest { string recipientGroupId = 1; string recipientId = 2; string companyId = 3; string oldRecipientGroupId = 4; string oldRecipientId = 5; } message UnlinkRecipientFromInvoiceRequest { string recipientGroupId = 1; string recipientId = 2; string companyId = 3; } message UnlinkRecipientsFromInvoicesRequest { repeated string recipientGroupIds = 1; repeated string recipientIds = 2; string companyId = 3; } message GetRecipientGroupsRequest { repeated string recipientGroupIds = 1; repeated string recipientIds = 2; } message GetRecipientsRequest { repeated string ids = 1; } message RecipientsResponse { repeated Recipient recipients = 1; } message GetRecipientGroupByInternalNumberRequest { string internalNumber = 1; }
Last modified: 20 October 2024