Add requests to a payout request batch
Experimental

Request

Adds payout requests to a batch with a specified ID. Accepts payout requests in any status, with or without allocations. A batch contains a maximum of 1000 payout requests.

Provide exactly one of the following fields:

  • payoutRequestIds to add specific payout requests.
  • filter to add payout requests that match the filter when the operation runs.

If any explicitly specified payout request is already associated with a batch, the operation returns a 409 Conflict response. Filter results exclude payout requests that are already associated with a batch. If more payout requests match the filter than the batch can contain, the operation adds only the oldest matching requests up to the batch limit, sorted by creation time. If adding explicitly specified payout requests would increase the batch to more than 1000 requests, the operation returns a 409 Conflict response. If the batch has reached its payout request limit, the operation returns a 409 Conflict response for either selection method. This operation is atomic. If a conflict occurs, the operation adds no payout requests to the batch.

Security
SecretApiKey or JWT
Path
idstring, <= 50 characters^[@~\-\.\w]+$required

ID of the resource.

Bodyapplication/jsonrequired

Selection of payout requests to add to the batch.

One of:
payoutRequestIdsArray of strings, [ 1 .. 1000 ] items, uniquerequired

IDs of the payout requests to add to the batch.

curl -i -X POST \
  'https://www.rebilly.com/_mock/catalog/all/payout-request-batches/{id}/payout-requests' \
  -H 'Content-Type: application/json' \
  -H 'REB-APIKEY: YOUR_API_KEY_HERE' \
  -d '{
    "payoutRequestIds": [
      "pout_req_0YVDMDE2BMC6KBB5MX76RF6T80"
    ]
  }'

Responses

Payout requests added to the batch.

Headers
X-RateLimit-Limitinteger

Total number of rate limit tokens for this request within a rate limit period. For more information, see Rate limits.

Example:3600
X-RateLimit-Remaininginteger

Remaining number of rate limit tokens for this request within the rate limit period. For example, in the sandbox environment, rate limits for non-GET endpoints are set at 3000 requests per 10 minutes.

Example:3600
Bodyapplication/json
idstring, <= 50 charactersread-only

ID of the batch.

Example:"preq_batch_0YVDMDE2BMC6KBB5MX76RF6T80"
userIdstring, <= 50 charactersread-only

ID of the user who created the batch.

Example:"usr_0YVCEENYJ3D7Q9EN6BN16HA0G4"
totalCountinteger, >= 0read-only

Total number of payout requests in the batch.

Example:10
customerCountinteger, >= 0read-only

Number of unique customers in the batch.

Example:3
totalAmountByCurrencyArray of objectsread-only

Total payout amount grouped by currency in the batch.

descriptionstring or null, <= 255 characters

Optional description of the batch.

Example:"Batch processed on 2024-01-15"
allocationOrderArray of strings or null, [ 2 .. 25 ] items, unique

Order for auto-allocation of payout requests in this batch. When set, this field overrides the organization-level allocation order during batch auto-allocation. Must contain selected-payment-instrument exactly once. Valid values: payment-card (payment cards), alternative-payment-methods (catch-all for alternative payment methods), selected-payment-instrument (customer-requested instrument), or any payment method API name (for example, paypal, Interac-eTransfer).

Example:
[ "paypal", "Interac-eTransfer", "payment-card", "alternative-payment-methods", "selected-payment-instrument" ]
createdTimestring, (date-time)(CreatedTime)read-only

Date and time when the batch was created.

updatedTimestring, (date-time)(UpdatedTime)read-only

Date and time when the batch was last updated.

Response
{ "id": "preq_batch_0YVDMDE2BMC6KBB5MX76RF6T80", "userId": "usr_0YVCEENYJ3D7Q9EN6BN16HA0G4", "totalCount": 10, "customerCount": 3, "totalAmountByCurrency": [ {} ], "description": "Batch processed on 2024-01-15", "allocationOrder": [ "paypal", "Interac-eTransfer", "payment-card", "alternative-payment-methods", "selected-payment-instrument" ], "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z", "_links": [ {} ] }