ent_, acct_, pay_). In addition, every created resource accepts an optional externalId: your own unique identifier for the resource. Use it to correlate Melio resources with records in your own system and to look resources up without having to store Melio ids.
Setting an external ID
SendexternalId when you create a resource:
Uniqueness and conflicts
AnexternalId is unique per partner, per resource type. The same value can be used once for an entity and once for a payment, but reusing it for two resources of the same type is rejected:
This makes
externalId a useful recovery tool. If a create fails with DUPLICATE_EXTERNAL_ID, the resource already exists. Fetch it with a lookup (below) and reuse it rather than creating a duplicate.
Looking resources up by external ID
Each list endpoint accepts anexternalId query parameter that returns the single resource matching your id:
External IDs in webhooks
Webhook deliveries include your external IDs so you can route an event to your own records without a follow-upGET:
externalId- your id for the affected resource, if one was set.entityExternalId- your id for the business entity that holds the resource (present on account and payment events).
External IDs vs. idempotency keys
AnexternalId identifies a resource; it is not a request-deduplication key. Deduplicating a retried create request is the job of the Idempotency-Key header. The two are complementary and are often sent together on a create: the Idempotency-Key makes the request safe to retry, and the externalId names the resulting resource. See Idempotency.