Upload Disbursement 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.
Path Parameters
- id string required
ID of the Disbursement
- multipart/form-data
Request Body required
- file binary required
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
Response Headers
- application/json
- Schema
- Example (from schema)
- response
Schema
- message string
{
"message": "File uploaded succesfully"
}
{
"message": "File uploaded succesfully"
}
Bad Request
Response Headers
- application/json
- Schema
- Example (from schema)
- response
Schema
- error string
extras object
foo stringmessage string
{
"error": "Invalid file format *.xyz",
"extras": {
"foo": "bar",
"message": "Not authorized"
}
}
{
"error": "Invalid file format *.xyz",
"extras": {
"foo": "bar",
"message": "Not authorized"
}
}
Unauthorized
Response Headers
- application/json
- Schema
- Example (from schema)
- response
Schema
- error string
extras object
status numbermessage string
{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}
{
"error": "Not authorized",
"extras": {
"status": 401,
"message": "Not authorized"
}
}
Forbidden
Response Headers
- application/json
- Schema
- Example (from schema)
- response
Schema
- error string
{
"error": "Forbidden"
}
{
"error": "Forbidden"
}
Not Found
Response Headers
- application/json
- Schema
- Example (from schema)
- response
Schema
- error string
extras object
status numbermessage string
{
"error": "Not found",
"extras": {
"status": 404,
"message": "Disbursement not found"
}
}
{
"error": "Not found",
"extras": {
"status": 404,
"message": "Disbursement not found"
}
}
Loading...