Recipients-Post-v6
Jump to navigation
Jump to search
Barion API: POST v6/recipients
| POST | /v6/recipients |
|---|
This is an API endpoint to create a new recipient with at most one payout method.
Prerequisites before use:
Authentication
Input properties
| Property name | Property type | Limitations and constraints | Description |
|---|---|---|---|
| Idempotency-Key | GUID |
|
Idempotency key used to safely retry requests without duplicating operations. Passed in the request header.
See Idempotency-Key. |
| <root> | Object |
|
|
| recipientType | String |
|
Type of the recipient. |
| companyName | String |
|
Name of the company. |
| firstName | String |
|
First name of the recipient. |
| lastName | String |
|
Last name of the recipient. |
| payoutMethod | Object |
|
Payout method to associate with the recipient at creation time. See the object. |
Output properties
HTTP status code: 201 Created
| Property name | Property type | Description |
|---|---|---|
| <root> | Object | |
| recipientId | String | Unique identifier of the newly created recipient. Format: rcp_<ordered-base64-ulid>.
|
| payoutMethodId | String | Unique identifier of the newly created payout method. Format: pout_<ordered-base64-ulid>. null if no payout method was provided in the request.
|
To find out which errors this endpoint can produce, visit the Calling the API – Handling the response page. Note that this endpoint uses camelCase field names in error responses.
Possible error messages
| Condition | ErrorCode | HTTP status code |
|---|---|---|
| Invalid input data | ModelValidationError |
400 |
| Authentication fails | 401 |