Docs
DocumentationAPI ReferenceAsk AI Assistant
  • Home
    • Get Your Business Started
    • Services and Supported Features
  • Documentation
    • Developer Quickstart
      • Authentication
      • Card Sales and Consent
      • Querying and Filtering
      • Payment Reminders
    • Getting Started
      • Integration Checklist
      • Integration Options
        • REST API
        • Android SDK
        • iOS SDK
        • React Native Wrapper
        • PayForm
        • Verifone
        • Virtual Terminal
      • Basics
        • Authentication
        • API Best Practices
        • API Input Validation
        • Testing Considerations
      • Client Admin Portal
    • Testing
      • Testing Overview
      • Global Payments Testing
      • First Data Testing
      • ACH Testing
    • Resources
      • Tools and Downloads
      • Vocabulary
      • Querying
      • Error Codes
      • Software Requirements
  • API Reference
    • REST API
      • Authentication
      • ACH
      • Card Operations
        • Process a Card Sale
      • Consent Annual
        • Create Annual Consent
      • Consent Recurring
        • Create Recurring Consent
      • Consent Subscription
      • International
      • PayForm
      • Query
        • Account
        • ACH
        • Batch
        • Consent Annual
        • Consent Recurring
        • Consent General
        • Recurring Schedule
        • Receipt
        • Transaction
        • Voice
        • Query General
        • Reconcile
      • Receipt
      • Recurring Schedule
      • Settlement
      • Text to Pay
  • Help
    • Customer Support
      • FAQ
Powered by GitBook

Copyright © Number

On this page

Was this helpful?

Export as PDF
  1. API Reference
  2. REST API
  3. Query

Consent General

Queries related to all types of consent

PreviousConsent RecurringNextRecurring Schedule

Last updated 4 months ago

Was this helpful?

  • POSTConsent General Query
  • POSTConsents Expiring Cards
  • POSTConsents Expiring Cards 01

Consent General Query

post

Query general consent records using specific filter criteria.

Header parameters
SessKeystringRequired

A unique session key used for authentication in API calls. This key is generated upon successful authentication and must be included in all subsequent requests.

Example: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-TypestringRequiredExample: application/json
AcceptstringRequiredExample: application/json
Body
QuerystringOptional

A query string for obtaining specific consent records using Number's query language. Build logical terms and join them with '&&' for logical AND or '||' for logical OR. Use single quotes for text and date values. Refer to the variable chart for query composition:

  • A: MERCHANT ID - The merchant record you are interested in, e.g. (A=1).
  • B: START DATE - The date the consent becomes active, e.g. (B>='10/20/2024').
  • C: END DATE - The date the consent expires, e.g. (C<='10/20/2024').
  • D: ACCOUNT HOLDER LAST NAME - Last name of the account holder, e.g. (D LIKE '%MITH') for all names that end with 'MITH'.
  • E: CREATED ON - The date the consent was created, e.g. (E<='10/20/2024').
  • F: CUSTOMER REFERENCE ID - User-defined value on the consent.
  • G: CONSENT TYPE - The type of consent, e.g. (G='-1').
    • -1: ALL
    • 1: ANNUAL
    • 2: ONE-TIME
    • 3: RECURRING
    • 4: SUBSCRIPTION
  • H: ENABLED - Indicates whether the consent is currently enabled, e.g. (H=1).
  • J: RPGUID - User-defined value on the consent.
  • K: ACCOUNT HOLDER FIRST NAME - First name of the account holder, e.g. (K LIKE 'ROB%') for all names that start with 'ROB'.
  • Z: CONSENT ID - The unique identifier for the consent, e.g. (Z=15875).
Example: (G=1)&&(B>'10/20/2024')
Responses
200
Successful response with consent records.
application/json
post
POST /APIcardProcREST/v1.0.0/Query/ConsentGeneral HTTP/1.1
Host: easypay5.com
SessKey: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-Type: application/json
Accept: application/json
Content-Length: 60

{
  "Query": "(A=-1)&&(G=1)&&(E>='3/29/2023')&&(E<'4/29/2023')"
}
200

Successful response with consent records.

{
  "ConsentGeneral_QueryResult": {
    "Consents": [
      {
        "AcctHolderFirstName": "Sean",
        "AcctHolderID": 1140,
        "AcctHolderLastName": "Tester",
        "AcctNo": "0055",
        "AuthTxID": 2175,
        "ConsentType": "S",
        "CreatedBy": "Sally_Smith",
        "CreatedOn": "2024-12-01 11:19:01",
        "CustID": 1165,
        "CustomerRefID": "A1523644",
        "EndDate": "2024-12-01 11:19:01",
        "ID": 568,
        "IsEnabled": true,
        "MerchID": 1,
        "ModifiedBy": ":",
        "ModifiedOn": "2024-12-01 11:19:01",
        "NumDays": 2107,
        "RPGUID": "adf98580-b4ab-42fc-bb99-01c89964afe9",
        "ServiceDescrip": "REST Test",
        "StartDate": "2024-12-01 11:19:01"
      }
    ],
    "ErrCode": 0,
    "ErrMsg": "",
    "FunctionOk": true,
    "NumRecords": 1,
    "RespMsg": "Successfully Returned Consent Records : 1"
  }
}

Consents Expiring Cards

post

Retrieve consents associated with cards that are expiring within a specified number of days.

Header parameters
SessKeystringRequired

A unique session key used for authentication in API calls. This key is generated upon successful authentication and must be included in all subsequent requests.

Example: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-TypestringRequiredExample: application/json
AcceptstringRequiredExample: application/json
Body
NumDaysintegerOptional

The number of days within which the cards are expiring.

Example: 20
Responses
200
Successful response with consents for expiring cards.
application/json
post
POST /APIcardProcREST/v1.0.0/Query/ConsentsExpiringCards HTTP/1.1
Host: easypay5.com
SessKey: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-Type: application/json
Accept: application/json
Content-Length: 14

{
  "NumDays": 20
}
200

Successful response with consents for expiring cards.

{
  "ConsentsExpiringCardsResult": {
    "Consents": [
      {
        "AcctHolderFirstName": "Bruce",
        "AcctHolderID": 78,
        "AcctHolderLastName": "Wayne",
        "AcctNo": "5439",
        "CardExpDate": "2024-12-01 11:19:01",
        "CardExpDateMMYY": "1228",
        "ConsentType": "S",
        "CreatedBy": "Savannah_Tester",
        "CreatedByOrigin": "API",
        "CreatedOn": "2024-12-01 11:19:01",
        "CustID": 77,
        "CustomerRefID": "modify",
        "EndDate": "2024-12-01 11:19:01",
        "ID": 55,
        "IsEnabled": true,
        "MerchID": 3,
        "ModifiedOn": "2024-12-01 11:19:01",
        "RPGUID": "adf98580-b4ab-42fc-bb99-01c89964afe9",
        "ServiceDescrip": "API Modify",
        "StartDate": "2024-12-01 11:19:01"
      }
    ],
    "ErrCode": 0,
    "ErrMsg": "",
    "FunctionOk": true,
    "NumRecords": 3,
    "RespMsg": ""
  }
}

Consents Expiring Cards 01

post

Retrieve consents for cards expiring within a specified date range.

Header parameters
SessKeystringRequired

A unique session key used for authentication in API calls. This key is generated upon successful authentication and must be included in all subsequent requests.

Example: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-TypestringRequiredExample: application/json
AcceptstringRequiredExample: application/json
Body
StartDatestring · dateOptional

The start date of the expiration period.

Example: 7/10/2023
EndDatestring · dateOptional

The end date of the expiration period.

Example: 8/9/2023
Responses
200
Successful response with consents for expiring cards in the specified range.
application/json
post
POST /APIcardProcREST/v1.0.0/Query/ConsentsExpiringCards_01 HTTP/1.1
Host: easypay5.com
SessKey: A1842D663E9A4A72XXXXXXXX303541303234373138
Content-Type: application/json
Accept: application/json
Content-Length: 46

{
  "StartDate": "7/10/2023",
  "EndDate": "8/9/2023"
}
200

Successful response with consents for expiring cards in the specified range.

{
  "ConsentsExpiringCards_01Result": {
    "Consents": [
      {
        "AcctHolderFirstName": "Bruce",
        "AcctHolderID": 78,
        "AcctHolderLastName": "Wayne",
        "AcctNo": "5439",
        "CardExpDate": "2024-12-01 11:19:01",
        "CardExpDateMMYY": "1228",
        "ConsentType": "S",
        "CreatedBy": "Savannah_Tester",
        "CreatedByOrigin": "API",
        "CreatedOn": "2024-12-01 11:19:01",
        "CustID": 77,
        "CustomerRefID": "modify",
        "EndDate": "2024-12-01 11:19:01",
        "ID": 55,
        "IsEnabled": true,
        "MerchID": 3,
        "ModifiedOn": "2024-12-01 11:19:01",
        "RPGUID": "adf98580-b4ab-42fc-bb99-01c89964afe9",
        "ServiceDescrip": "API Modify",
        "StartDate": "2024-12-01 11:19:01"
      }
    ],
    "ErrCode": 0,
    "ErrMsg": "",
    "FunctionOk": true,
    "NumRecords": 1,
    "RespMsg": ""
  }
}