App

A SocialPay API request must have an X-Api-Key assigned to a registered App which means an App must be available for any API request.

By default all SocialPay API calls use the MakeitSocial App, and it is not necessary to change this.

App objects can only be accessisble using the admin role, ie, the JWT token user must have an admin role on SocialPay.

GET a list of apps

Query a list of apps. Parameters for pagination, query condition and sort order can be used for this method, see pagination and query pages for details.

Get a list of apps example

curl /v2/apps?page=1&per_page=20&filter=&sort=  -H "X-Api-Key:.." -H "Authorization:JWT .."

Successful return object:

{
    "page": 1,
    "per_page": 20,
    "data": []
}

GET a single app by ID

Query an App object by ID.

Get a single app example

curl /v2/apps/1 -H "X-Api-Key:.." -H "Authorization:JWT .."

Successful return object:

{
    "id": 1,
    "xid": 20,
    "name": "app-1",
    "email": "adam@makeitsocial.com",
    "apikey": "..",
    "status": "A"
}

POST an App

Create an App entity.

POST to create an App:

curl -X POST -d '{"xid":100,"name":"app100"}' /v2/apps -H "X-Api-Key:.." -H "Authorization:JWT .."

PUT an App

Update an App entity.

PUT to update an App:

curl -X PUT -d '{"email":"a@b.com"}' /v2/apps/1 -H "X-Api-Key:.." -H "Authorization:JWT .."

DELETE an App

Delete an App entity. Only system admin role can make this request.

Delete an App:

curl -X DELETE /v2/apps/1 -H "X-Api-Key:.." -H "Authorization:JWT .."

results matching ""

    No results matching ""