Withdrawal templates
Use these methods to get data about withdrawal templates saved by clients.
When making withdrawals via the B2Core UI, clients can save data about withdrawal transactions as templates to avoid specifying the same information repeatedly for frequent withdrawals.
GET[host]/api/v2/withdrawals/patterns |
|
GET[host]/api/v2/withdrawals/patterns/{patternId} |
Get a list of withdrawal templates
Use this method to obtain a list of withdrawal templates saved by clients.
Note
If such a request is made by an admin user that is only permitted to view clients with certain tags, a response includes only the withdrawal templates saved by clients marked with these tags.
To obtain detailed information about a specific withdrawal template, use a separate method to get withdrawal template details.
Request
Header parameters:
Authorization: Bearer <access_token>
Query parameters:
The following filter parameters are available for this method:
- clientId
The client identifier.
- name
The name of a withdrawal template.
- fromCreateTime
The start date of a period when withdrawal templates were created.
- toCreateTime
The end date of a period when withdrawal templates were created.
The following sorting parameters are available for this method:
- createTime string
The date and time when a withdrawal template was created.
- name string
The name of a withdrawal template.
Refer to the Query parameters section in the API Overview for details on applying filter and sorting parameters.
GET[host]/api/v2/withdrawals/patterns
curl --location -g --request GET 'https://host.name/api/v2/withdrawals/patterns?offset=0&limit=10&sort_by=createTime&filter[clientId]=1&filter[name]=Nick&filter[fromCreateTime]=2022-12-01T07:23:59%2B00:00&filter[toCreateTime]=2022-12-01T07:23:59%2B00:00' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'
Response
A response contains an array of Withdrawal Template objects providing information about about the withdrawal templates matching the request parameters.
Get withdrawal template details
Use this method to obtain detailed information about a specified withdrawal template.
To obtain a list of saved withdrawal templates, use a separate method to get a list of withdrawal templates.
Request
Header parameters:
Authorization: Bearer <access_token>
Path parameters:
- patternId required
The identifier of a withdrawal template.
GET[host]/api/v2/withdrawals/patterns/{patternId}
curl --location --request GET 'https://host.name/api/v2/withdrawals/patterns/1' \
--header 'Authorization: Bearer <token>' \
--header 'accept-language: ja'
Response
A response contains a Withdrawal Template object providing information about the specified withdrawal template.