List your allocations
curl --request GET \
--url https://{host}/v1/allocations \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v1/allocations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v1/allocations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/v1/allocations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"object": "list",
"has_more": true,
"next_cursor": "<string>",
"data": [
{
"object": "allocation",
"id": "<string>",
"account": "<string>",
"amount_kobo": 123,
"state": "sending",
"reason": "<string>",
"reject_reason": "invalid_amount",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}List your allocations
Returns your allocations, newest first.
GET
/
v1
/
allocations
List your allocations
curl --request GET \
--url https://{host}/v1/allocations \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{host}/v1/allocations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://{host}/v1/allocations"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://{host}/v1/allocations"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"object": "list",
"has_more": true,
"next_cursor": "<string>",
"data": [
{
"object": "allocation",
"id": "<string>",
"account": "<string>",
"amount_kobo": 123,
"state": "sending",
"reason": "<string>",
"reject_reason": "invalid_amount",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}{
"error": {
"type": "authentication_error",
"code": "unauthorized",
"message": "<string>",
"doc_url": "<string>",
"param": "<string>",
"reject_reason": "<string>"
}
}Authorizations
Authorization: Bearer <key>. Sandbox keys start with mgw_test_ and live keys start with mgw_live_. Each key works only in its own environment, and a live key works only from the IP addresses or ranges registered for it.
Query Parameters
The number of items to return.
Required range:
1 <= x <= 100The next_cursor from the previous page, unchanged.