List all recipients
Retrieve a paginated list of all recipients belonging to your account. Results can be filtered by date range and sorted chronologically.
API Credentials
Request Parametersโ
Recommended - 5 fieldsRecommended Parameters
`limit`INTEGER(optional)
Number of records to return per page.
`offset`INTEGER(optional)
Number of records to skip before returning results. Used for pagination.
`order`STRING(optional)
Sort order for results based on creation date.
`from`STRING(optional)
Filter recipients created on or after this UTC datetime. ISO 8601 format.
`to`STRING(optional)
Filter recipients created on or before this UTC datetime. ISO 8601 format.
Responsesโ
200
Successful transactionRecipients list retrieved successfully. Returns paginated list with metadata.
Response structure:
object- Always "list"data- Array of recipient objectstotal- Total number of recipients matching filterslimit- Number of records per pageoffset- Current pagination offsetfrom,to- Applied date filters
400
Bad requestRequest validation failed. Check the error message for details.
Common causes:
- Invalid date format for
fromorto - Invalid
ordervalue - Negative
offsetorlimit limitexceeds maximum (100)
401
UnauthorizedAuthentication failed. Invalid or missing API key.
Common causes:
- Missing Authorization header
- Invalid secret key
- Using public key instead of secret key
- Incorrect HTTP Basic Auth format
Code samplesโ
- cURL
- Ruby
- Python
- Node.js
- PHP
- Java
- C#
- Go
curl https://api.omise.co/recipients \
-u skey_test_5xuy4w91xqz7d1w9u0t:
require 'omise'
Omise.api_key = 'skey_test_5xuy4w91xqz7d1w9u0t'
recipients = Omise::Recipient.list(limit: 20, offset: 0)
import omise
omise.api_secret = 'skey_test_5xuy4w91xqz7d1w9u0t'
recipients = omise.Recipient.retrieve(limit=20, offset=0)
const omise = require('omise')({
secretKey: 'skey_test_5xuy4w91xqz7d1w9u0t'
});
const recipients = await omise.recipients.list({
limit: 20,
offset: 0
});
<?php
define('OMISE_SECRET_KEY', 'skey_test_5xuy4w91xqz7d1w9u0t');
$recipients = OmiseRecipient::retrieve([
'limit' => 20,
'offset' => 0
]);
Client client = new Client.Builder()
.secretKey("skey_test_5xuy4w91xqz7d1w9u0t")
.build();
ScopedList<Recipient> recipients = client.recipients()
.list(new ScopedList.Options()
.limit(20)
.offset(0));
var client = new Client("skey_test_5xuy4w91xqz7d1w9u0t");
var recipients = await client.Recipients.List(new ListOptions
{
Limit = 20,
Offset = 0
});
client, _ := omise.NewClient(
"pkey_test_5xuy4w91xqz7d1w9u0t",
"skey_test_5xuy4w91xqz7d1w9u0t",
)
recipients, _ := client.Recipients().List(&operations.ListRecipients{
Limit: 20,
Offset: 0,
})
Paginationโ
Use limit and offset parameters to paginate through results:
# First page (0-19)
curl https://api.omise.co/recipients?limit=20&offset=0 \
-u skey_test_5xuy4w91xqz7d1w9u0t:
# Second page (20-39)
curl https://api.omise.co/recipients?limit=20&offset=20 \
-u skey_test_5xuy4w91xqz7d1w9u0t:
Try it outโ
Recommended - 5 fields