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 standard format that can be found at dev/sample/sample-disbursement.csv
. The operation is idempotent, guaranteed by deleting and recreating the disbursement attributes when this endpoint is called.
Request
Path Parameters
id stringrequired
ID of the Disbursement
- multipart/form-data
Body
required
file binaryrequired
Disbursement instructions file to upload. The CSV file should be in the following format: phone,id,amount,verification
Responses
- 201
- 400
- 401
- 403
- 404
Created
- application/json
- Schema
- Example (from schema)
- Example
Schema
message string
{
"message": "File uploaded succesfully"
}
{
"message": "File uploaded succesfully"
}
Bad Request
- application/json
- Schema
- Example (from schema)
- Example
Schema
error string
extras
object
foo string
message string
{
"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
error string
extras
object
status number
message string
{
"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 string
{
"error": "Forbidden"
}
{
"error": "Forbidden"
}
Not Found
- application/json
- Schema
- Example (from schema)
- Example
Schema
error string
extras
object
status number
message string
{
"error": "Not found",
"extras": {
"status": 404,
"message": "Disbursement not found"
}
}
{
"error": "Not found",
"extras": {
"status": 404,
"message": "Disbursement not found"
}
}
Loading...