Upload Disbursement Instructions
POST/disbursements/:id/instructions
Adds a file containing a list of receivers to a DRAFT
disbursement. This step is required before a disbursement can begin. The file must be a CSV and has a different possible formats according with the disbursement configuration, and they can be found at public/resources/disbursementTemplates. The operation is idempotent, guaranteed by deleting and recreating the disbursement attributes when this endpoint is called.
Request
Path Parameters
ID of the Disbursement
- multipart/form-data
Body
required
Disbursement instructions file to upload. The CSV file columns can vary depending om the way the disbursement was configured, and the fields are a subset of the following: [phone
, email
, id
, amount
, verification
, paymentID
, walletAddress
]
Responses
- 201
- 400
- 401
- 403
- 404
Created
- application/json
- Schema
- Example (from schema)
- Example
Schema
{
"message": "File uploaded succesfully"
}
{
"message": "File uploaded succesfully"
}
Bad Request
- application/json
- Schema
- Example (from schema)
- Example
Schema
extras
object
{
"error": "Invalid file format *.xyz",
"extras": {
"foo": "bar",
"message": "Not authorized"
}
}
{
"error": "Invalid file format *.xyz",
"extras": {
"foo": "bar",
"message": "Not authorized"
}
}
Unauthorized
- application/json
- Schema
- Example (from schema)
- Example
Schema
extras
object
{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}
{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}
Forbidden
- application/json
- Schema
- Example (from schema)
- Example
Schema
{
"error": "Forbidden"
}
{
"error": "Forbidden"
}
Not Found
- application/json
- Schema
- Example (from schema)
- Example
Schema
extras
object
{
"error": "Not found",
"extras": {
"status": 404,
"message": "Disbursement not found"
}
}
{
"error": "Not found",
"extras": {
"status": 404,
"message": "Disbursement not found"
}
}