Push data
Create a new business linked
To create a new business the usual authentication approach is followed except uid
is not required. The uid
along with an authentication token will be returned once the business is created. If the email supplied already has a stub account the account details will be returned in addition to the uid
and token.
POST /api/push/business HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 190
{
"apikey": "text",
"appid": "text",
"data": {
"businessname": "text",
"firstname": "text",
"lastname": "text",
"industry": "text",
"vatregistered": true,
"email": "text"
},
"webhook": "text",
"signature": "text"
}
No content
Asynchronously record income
Record income and send it to the account of the business specified by the uid
POST /api/push/income HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 233
{
"apikey": "text",
"appid": "text",
"uid": "text",
"data": {
"id": "text",
"date": "text",
"name": "text",
"category": "text",
"notes": "text",
"currency": "ZAR",
"amount": 1,
"vat": 1,
"productid": "text",
"feeid": "text"
},
"webhook": "text",
"signature": "text"
}
No content
Asynchronously record an expense
Create an expense and send it to the account of the business specified by the uid
POST /api/push/expense HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 199
{
"apikey": "text",
"appid": "text",
"uid": "text",
"data": {
"id": "text",
"date": "text",
"name": "text",
"category": "text",
"notes": "text",
"currency": "ZAR",
"amount": 1,
"vat": 1
},
"webhook": "text",
"signature": "text"
}
No content
Asynchronously record a sale
Record a sale and send it to the account of the business specified by the uid
POST /api/push/sale HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 523
{
"apikey": "text",
"appid": "text",
"uid": "text",
"data": {
"id": "text",
"payment": {
"id": "text",
"date": "text",
"name": "text",
"category": "text",
"currency": "ZAR",
"amount": 1,
"vat": 1
},
"items": [
{
"id": "text",
"name": "text",
"description": "text",
"price": 1,
"quantity": 1,
"cost": 1,
"costcurrency": "ZAR"
}
],
"customer": {
"id": "text",
"name": "text",
"email": "text",
"address": "text",
"address2": "text",
"suburb": "text",
"city": "text",
"postalcode": "text",
"country": "text",
"vatnumber": "text",
"registrationnumber": "text"
}
},
"webhook": "text",
"signature": "text"
}
No content
Asynchronously record multiple income and expenses
Push a batch of income and expenses for a specific user.
POST /api/push/many HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 370
{
"apikey": "text",
"appid": "text",
"uid": "text",
"data": {
"income": [
{
"id": "text",
"date": "text",
"name": "text",
"category": "text",
"notes": "text",
"currency": "ZAR",
"amount": 1,
"vat": 1,
"productid": "text",
"feeid": "text"
}
],
"expenses": [
{
"id": "text",
"date": "text",
"name": "text",
"category": "text",
"notes": "text",
"currency": "ZAR",
"amount": 1,
"vat": 1
}
]
},
"webhook": "text",
"signature": "text"
}
No content
Asynchronously push settlement data
Push multiple income and expenses linked to a settlement that will be paid out in one transaction. Income and expenses are only considered a settlement if they are paid out if the entire group is paid into a bank account in one go.
The feeid
links income with its associated processing expense.
POST /api/push/settlement HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 432
{
"apikey": "text",
"appid": "text",
"uid": "text",
"data": [
{
"income": [
{
"id": "text",
"date": "text",
"name": "text",
"category": "text",
"notes": "text",
"currency": "ZAR",
"amount": 1,
"vat": 1,
"productid": "text",
"feeid": "text"
}
],
"expenses": [
{
"id": "text",
"date": "text",
"name": "text",
"category": "text",
"notes": "text",
"currency": "ZAR",
"amount": 1,
"vat": 1
}
],
"settlement": {
"id": "text",
"amount": 1,
"fee": 1,
"date": "text"
}
}
],
"webhook": "text",
"signature": "text"
}
No content
Asynchronously continue a subscription
Notify us that a subscription you are collecting on our behalf has been paid. This entitles the user to another month of access to stub premium.
POST /api/push/subscription HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 127
{
"apikey": "text",
"appid": "text",
"uid": "text",
"data": {
"id": "text",
"date": "text",
"amount": 1
},
"webhook": "text",
"signature": "text"
}
No content
Asynchronously cancel a subscription
Notify us that a subscription you are collecting on our behalf has been cancelled. This entitles the user to stub premium until the end of the current billing period. Please note that this doesn't cancel subscriptions set up from within stub.
POST /api/push/cancellation HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 104
{
"apikey": "text",
"appid": "text",
"uid": "text",
"data": {
"date": "text"
},
"webhook": "text",
"signature": "text"
}
No content
Reset all transactional test data
This allows you to clear all the data in a test account except the basic account info and subscription status.
POST /api/push/reset HTTP/1.1
Host:
Content-Type: application/json
Accept: */*
Content-Length: 45
{
"apikey": "text",
"appid": "text",
"uid": "text"
}
No content
Last updated