Transactions API

The Transactions API is an integral component of the core service. As a result, all requests should be directed to: https://api.subsbase.io/core/v2/graphql.

The core service expects 2 headers, the X-SITE-ID and Authorization so the request would be:

POST https://api.subsbase.io/core/v2/graphql
Authorization: Bearer {server token}
X-SITE-ID: {your site id}
Consuming the Transactions API requires that a server token is used to authenticate the request. The server token is expected in the Authorization header.

Queries

Transactions Query

query GetTransactions($siteId: String!,$filter: FilterGQLInputType,$pagination: PaginationGQLInputType,$sorting: [SortingGQLInputType]) { 
    transactions (siteId: $siteId,filter: $filter,pagination: $pagination,sorting: $sorting) {
        isSuccess
        pagination
        data{
            id
            #All properties are found in the TransactionGQLType
        }
        message
    } 
}
  • Request Variables Sample:
{
  "siteId": "Your site ID",
  "pagination": {
    "page": 1,
    "perPage": 10,
  },
  "sorting": [
    {
      "field": "id",
      "direction": "Descending",
    },
  ],
  "filter": [
    {
      "field": "id",
      "operator": "Contains",
      "value": "255",
    },
  ],
}

Transaction Query

query GetTransaction($siteId: String!,$transactionId: String!) { 
    transaction (siteId: $siteId,transactionId: $transactionId) {
        siteId
        id
        #All properties are found in the TransactionGQLType
    }

### variables
{"siteId":"","transactionId":""}