Requests
To create or update a resource, wrap your fields indata.attributes. No type, id, or relationships needed — the type is inferred from the endpoint and the ID is assigned by the server.
Creating a resource
Send aPOST request with a data object containing attributes:
Updating a resource
To update a resource, send aPUT request with only the fields you want to change inside attributes. Omitted fields remain unchanged.
The Natural API uses
PUT for partial updates — only the fields you include are modified.Responses
Responses follow the JSON:API specification. Resources may be singular or be comprised of lists, and each resource in a response has:type— A string identifying the kind of resource (e.g.,"agent","payment","transaction")id— A unique prefixed identifier (e.g.,agt_019cd179...,pay_019cd179...)attributes— The resource’s data fieldsrelationships(optional) — Links to related resources
Single resource
Responses for a single resource wrap the resource in adata object:
List of resources
List endpoints return an array of resources indata, with pagination metadata in meta:
next_cursor value from meta.pagination to fetch subsequent pages.
Relationships
Relationships connect resources to each other without nesting the full related resource. Each relationship contains adata object with the related resource’s type and id.
Relationships appear only in responses. In requests, reference related resources by including their ID directly in attributes (e.g., customer_party_id).
To-one relationships
A to-one relationship links to a single related resource:null value in data indicates the relationship is absent:
Common relationships
| Relationship | Description | Found on |
|---|---|---|
party | Owning party | Agents, Wallet Balances |
customer_party | Party making the payment | Payments, Transactions |
counterparty | Party receiving the payment | Payments |
source_party | Originating party | Transactions |
destination_party | Receiving party | Transactions |
source_wallet | Originating wallet | Transactions |
destination_wallet | Receiving wallet | Transactions |
Using relationship IDs
Use thetype and id from a relationship to fetch the related resource. For example, if a payment response includes:
Glossary
- Resource — An entity in the Natural API, such as a payment, agent, or transaction.
- Attribute — A piece of information about a resource (e.g.,
status,amount,created_at). - Relationship — A link from one resource to another, represented by
typeandid.