Poynt API
Just install the Poynt Node.js SDK (GitHub) and you are ready to go!
npm install poynt --save
Just install the Poynt Python SDK (GitHub) and you are ready to go!
pip install poynt
Introduction
Poynt REST APIs provide applications an ability to integrate with Poynt Services in the cloud.
Standards
All Poynt APIs are built with commonly used RESTful design patterns in the industry. Below you'll see all the Poynt Services and Entities exposed as Resources that you can access through standard HTTP semantics. HTTP status codes are used to communicate the success/failures states, OAuth2.0 is used for API Authentication and Authorization, and HTTP methods are used to operate on the resources.
Please take a note of the common patterns listed below that would help in simplifying your integration process.
Endpoint
All Poynt APIs can be accessed at: https://services.poynt.net
.
HTTP Headers
All Poynt APIs should be invoked with the following standard HTTP headers unless otherwise specified:
Api-Version
- Must be1.2
Authorization
-Bearer <poynt-issued-access-token>
Content-Type
- Usuallyapplication/json
POYNT-REQUEST-ID
- a unique request id to enforce idempotency where ever appropriate (usually for POST requests)
HTTP Status Code
All Poynt APIs return one or more of the following codes.
200
- OK, the operation was successful.201
- Created, when a new resource is created.204
- No Content, usually returned after deleting a resource.400
- Bad Request401
- Unauthorized, due to invalid access token or authorization needed.403
- Forbidden404
- Not Found500
- Internal Server Error
Dates/Times
All date time values are in GMT and is formatted in ISO 8601 format YYYY-MM-DDThh:mm:ssZ
.
Resource Updates
HTTP PATCH method is used to allow updates to existing Resources using json-patch as the request payload. Currently only add, remove, and replace operations are supported.
Pagination
Pagination is controlled by five parameters for most GET collection APIs. These parameters determine the result set and allow you to paginate through them.
If-Modified-Since
header- ISO8601 Time to filters result by item's last updated time.
startAt
query- ISO8601 Time to filters result by a specific start time.
startOffset
query- Integer offset from first item.
endAt
query- ISO8601 Time to filters result by a specific end time.
limit
query- Integer value 1 to 100 to limit the number of items returned. Default is 10.
Clients are encouraged to begin paging through a collection by specifying the If-Modified-Since
header at the start of their paging request. A limit
should also be specified to control the number of returned items. Should there be more items than can be returned, a HATEOAS link will also be returned.
If, however, the client wishes to specify a specific time window, it should use the startAt
/endAt
time window. This time window will be used to filter items out based on the item's updatedAt
time. When startAt
is specified, the server will ignore the If-Modified-Since
header. If no endAt
time is specified, it is assumed to be up to the latest time (now).
Clients should generally not need to use the startOffset
parameter. This parameter is used by the server to control the paging range in the HATEOAS links that it generates.
OAuth
Poynt APIs are secured with OAuth 2.0 to allow merchants to share data with developer applications as appropriate. The Poynt OAuth2.0 authorization API consist of a single token resource (end point) where client applications can obtain access tokens that can be used to invoke all other APIs.
Definition
POST /token
Sample Request
curl -H "api-version:1.2" -d "grantType=urn:ietf:params:oauth:grant-type:jwt-bearer&assertion=MY.SELFSIGNED.JWT" https://services.poynt.net/token
curl -H "api-version:1.2" -H "Authorization: MY.SELFSIGNED.JWT" -d "grantType=PASSWORD&businessId=d4b4ec82-0b3a-49c9-8424-1a6c16e3562a&username=Kelly&password=1234" https://services.poynt.net/token
Sample Response
{"expiresIn":900, "accessToken":"POYNT.ISSUED.JWT", "refreshToken":"REFRESH_TOKEN", "scope":"ALL", "tokenType":"BEARER"}
Definition
In the Node.js SDK, token generation and refresh is done automatically, behind the scenes, and so you don't have to worry about it yourself. Simply initialize the poynt
service with your application ID and either a filename or a string containing your PEM-encoded private key you downloaded from Poynt.net:
var poynt = require('poynt')({
applicationId: 'urn:aid:your-application-id',
filename: __dirname + '/key.pem'
});
or
var poynt = require('poynt')({
applicationId: 'urn:aid:your-application-id',
key: '-----BEGIN RSA PRIVATE KEY-----\n.....\n-----END RSA PRIVATE KEY-----'
});
Definition
In the Python SDK, token generation and refresh is done automatically, behind the scenes, and so you don't have to worry about it yourself. Simply initialize the poynt
service with your application ID and either a filename or a string containing your PEM-encoded private key you downloaded from Poynt.net:
import poynt
poynt.application_id = 'urn:aid:your-application-id'
poynt.filename = '/path/to/your/key.pem'
or
import poynt
poynt.application_id = 'urn:aid:your-application-id'
poynt.key = '-----BEGIN RSA PRIVATE KEY-----\n.....\n-----END RSA PRIVATE KEY-----'
Token
Generate an access token with either Json Web Token (JWT) bearer, password, or refresh token grant type.
The JWT bearer grant requires that the input grantType
form parameter be urn:ietf:params:oauth:grant-type:jwt-bearer
as defined by the JWT Profile for OAuth 2.0 specification. A self-signed JWT token must be provided by the client that is signed using the client's private key.
The password grant requires that a self-signed JWT token be provided via the Authorization
http header in addition to the business user's businessId
, username
, and password
.
Refresh token is also granted along with Access tokens to allow applications to refresh tokens that have expired. These tokens must always be stored securely by the applications.
Response
Returns a TokenResponse.
Payments
Orders
Orders resource represents a customer's request to purchase one or more items (goods or services) from a business. As such an order contains details about all the items that we purchased, discounts applied and transactions that paid for the order. An order can be in Opened, Cancelled or Completed states. The only thing these states really tell is whether the order is active from the merchant’s perspective or not. An active order will be in Opened state. An order that the merchant is done with will be in Completed or Cancelled state. Similarly items have their own states (Ordered, Fulfilled and Returned) and transactions their own (see documentation for Transactions). Typically a merchant would want to keep the Order in Opened state until all items in the order have either been Fulfilled or Returned and all payments have been completed.
Definition
GET /businesses/{businessId}/orders
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getOrders = function getOrders(options, next) { ... }
/**
* Get all orders at a business.
* @param {String} options.businessId
* @param {String} options.startAt (optional) - the time from which to start fetching orders
* @param {Integer} options.startOffset (optional)
* @param {String} options.endAt (optional) - the time at which to stop fetching orders
* @param {Integer} options.limit (optional) - the number of orders to fetch
* @param {String} options.cardNumberFirst6 (optional) - limit results to orders with transactions done by cards starting with these 6 numbers
* @param {String} options.cardNumberLast4 (optional) - limit results to orders with transactions done by cards ending with these 4 numbers
* @param {Integer} options.cardExpirationMonth (optional) - limit results to orders with transactions done by cards expiring in this month
* @param {Integer} options.cardExpirationYear (optional) - limit results to orders with transactions done by cards expiring in this year
* @param {String} options.cardHolderFirstName (optional) - limit results to orders with transactions done by cards with this card holder first name
* @param {String} options.cardHolderLastName (optional) - limit results to orders with transactions done by cards with this card holder last name
* @param {String} options.storeId (optional) - only fetch orders for this store
* @param {String} options.includeStaysAll (optional)
* @return {OrderList} orders
*/
Sample Request
poynt.getOrders({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
startOffset : 0,
limit : 1
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
})
Sample Response
{
"count": 1,
"links": [
{
"href": "/businesses/18f071cc-5ed4-4b33-80c1-305056d42bfb/orders?startAt=2017-02-03T02%3A34%3A14Z&endAt=2017-08-28T06%3A26%3A45Z&limit=1",
"method": "GET",
"rel": "next"
}
],
"orders": [
{
"amounts": {
"capturedTotals": {
"cashbackAmount": 0,
"currency": "USD",
"orderAmount": 625,
"tipAmount": 68,
"transactionAmount": 693
},
"currency": "USD",
"discountTotal": 0,
"feeTotal": 0,
"netTotal": 625,
"subTotal": 625,
"taxTotal": 0
},
"context": {
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"employeeUserId": 5247870,
"source": "INSTORE",
"storeDeviceId": "urn:tid:48c54303-6d51-39af-bdeb-4af53f621652",
"storeId": "c394627f-4f68-47fb-90a5-684ea801a352",
"transactionInstruction": "NONE"
},
"createdAt": "2017-02-03T01:40:21Z",
"customerUserId": 5249839,
"id": "01a0c6f9-015a-1000-e3ce-bbbd758e32de",
"items": [
{
"createdAt": "2017-02-03T01:40:21Z",
"discount": 0,
"fee": 0,
"id": 1,
"name": "water",
"productId": "f9faac3a-be56-4bff-b60b-84987cf021cb",
"quantity": 5,
"sku": "water",
"status": "FULFILLED",
"tax": 0,
"taxExempted": false,
"unitOfMeasure": "EACH",
"unitPrice": 125,
"updatedAt": "2017-02-03T01:40:21Z"
}
],
"orderNumber": "4",
"statuses": {
"fulfillmentStatus": "FULFILLED",
"status": "OPENED",
"transactionStatusSummary": "COMPLETED"
},
"taxExempted": false,
"transactions": [
{
"action": "AUTHORIZE",
"actionVoid": false,
"adjusted": true,
"amounts": {
"cashbackAmount": 0,
"currency": "USD",
"customerOptedNoTip": false,
"orderAmount": 625,
"tipAmount": 68,
"transactionAmount": 693
},
"amountsAdjusted": true,
"authOnly": false,
"context": {
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"businessType": "TEST_MERCHANT",
"employeeUserId": 5247870,
"mcc": "5812",
"source": "INSTORE",
"sourceApp": "co.poynt.services",
"storeDeviceId": "urn:tid:48c54303-6d51-39af-bdeb-4af53f621652",
"storeId": "c394627f-4f68-47fb-90a5-684ea801a352",
"transmissionAtLocal": "2017-02-03T01:40:08Z"
},
"createdAt": "2017-02-03T01:40:09Z",
"customerUserId": 5249839,
"fundingSource": {
"card": {
"cardHolderFirstName": "LAWRENCE",
"cardHolderFullName": "LUK/LAWRENCE",
"cardHolderLastName": "LUK",
"expirationDate": 31,
"expirationMonth": 8,
"expirationYear": 2019,
"id": 244219,
"numberFirst6": "414720",
"numberLast4": "4308",
"status": "ACTIVE",
"type": "VISA"
},
"debit": false,
"emvData": {
"emvTags": {
"0x50": "5649534120435245444954",
"0x5F20": "4C554B2F4C415752454E434520",
"0x5F24": "190831",
"0x5F2A": "0840",
"0x5F34": "02",
"0x82": "3C00",
"0x84": "A0000000031010",
"0x95": "0080008000",
"0x9A": "170202",
"0x9B": "E800",
"0x9C": "00",
"0x9F02": "000000000625",
"0x9F03": "000000000000",
"0x9F06": "A0000000031010",
"0x9F10": "06010A03A0A802",
"0x9F12": "43484153452056495341",
"0x9F1A": "0840",
"0x9F26": "376393F3F6B156AA",
"0x9F27": "80",
"0x9F33": "E0F0C8",
"0x9F34": "5E0000",
"0x9F35": "21",
"0x9F36": "0036",
"0x9F37": "94F3A4C5"
}
},
"entryDetails": {
"customerPresenceStatus": "PRESENT",
"entryMode": "INTEGRATED_CIRCUIT_CARD"
},
"type": "CREDIT_DEBIT"
},
"id": "624fbc0f-794c-4866-a211-0f5be53b8345",
"links": [
{
"href": "1b622bd1-c0db-4271-9fe1-4ed9fbf6610c",
"method": "GET",
"rel": "CAPTURE"
}
],
"partiallyApproved": false,
"pinCaptured": false,
"processorResponse": {
"acquirer": "CHASE_PAYMENTECH",
"approvalCode": "534216",
"approvedAmount": 625,
"batchId": "1",
"emvTags": {
"0x89": "454139324645",
"0x8A": "3030"
},
"processor": "MOCK",
"retrievalRefNum": "624fbc0f-794c-4866-a211-0f5be53b8345",
"status": "Successful",
"statusCode": "1",
"statusMessage": "Successful",
"transactionId": "624fbc0f-794c-4866-a211-0f5be53b8345"
},
"references": [
{
"id": "01a0c6f9-015a-1000-e3ce-bbbd758e32de",
"type": "POYNT_ORDER"
}
],
"settled": false,
"signatureCaptured": true,
"signatureRequired": false,
"status": "CAPTURED",
"updatedAt": "2017-02-03T02:34:14Z",
"voided": false
},
{
"action": "CAPTURE",
"actionVoid": false,
"adjusted": false,
"amounts": {
"cashbackAmount": 0,
"currency": "USD",
"customerOptedNoTip": false,
"orderAmount": 625,
"tipAmount": 68,
"transactionAmount": 693
},
"amountsAdjusted": false,
"authOnly": false,
"context": {
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"businessType": "TEST_MERCHANT",
"employeeUserId": 5247870,
"mcc": "5812",
"source": "INSTORE",
"storeDeviceId": "urn:tid:48c54303-6d51-39af-bdeb-4af53f621652",
"storeId": "c394627f-4f68-47fb-90a5-684ea801a352"
},
"createdAt": "2017-02-03T02:34:14Z",
"customerUserId": 5249839,
"fundingSource": {
"card": {
"cardHolderFirstName": "LAWRENCE",
"cardHolderFullName": "LUK/LAWRENCE",
"cardHolderLastName": "LUK",
"expirationDate": 31,
"expirationMonth": 8,
"expirationYear": 2019,
"id": 244219,
"numberFirst6": "414720",
"numberLast4": "4308",
"status": "ACTIVE",
"type": "VISA"
},
"debit": false,
"entryDetails": {
"customerPresenceStatus": "PRESENT",
"entryMode": "INTEGRATED_CIRCUIT_CARD"
},
"type": "CREDIT_DEBIT"
},
"id": "1b622bd1-c0db-4271-9fe1-4ed9fbf6610c",
"links": [
{
"href": "624fbc0f-794c-4866-a211-0f5be53b8345",
"method": "GET",
"rel": "AUTHORIZE"
}
],
"parentId": "624fbc0f-794c-4866-a211-0f5be53b8345",
"partiallyApproved": false,
"pinCaptured": false,
"processorResponse": {
"acquirer": "CHASE_PAYMENTECH",
"approvalCode": "283042",
"batchId": "1",
"processor": "MOCK",
"status": "Successful",
"statusCode": "1",
"statusMessage": "Successful",
"transactionId": "1b622bd1-c0db-4271-9fe1-4ed9fbf6610c"
},
"references": [
{
"id": "01a0c6f9-015a-1000-e3ce-bbbd758e32de",
"type": "POYNT_ORDER"
}
],
"settled": false,
"signatureCaptured": true,
"signatureRequired": false,
"status": "CAPTURED",
"updatedAt": "2017-02-03T02:34:14Z",
"voided": false
}
],
"updatedAt": "2017-02-03T01:40:21Z"
}
]
}
Definition
@classmethod
def get_orders(cls, business_id, start_at=None, start_offset=None,
end_at=None, limit=None, card_number_first_6=None,
card_number_last_4=None, card_expiration_month=None,
card_expiration_year=None, card_holder_first_name=None,
card_holder_last_name=None, store_id=None):
"""
Get all orders at a business by various criteria.
Arguments:
business_id (str): the business ID
Keyword arguments:
start_at (int, optional): get orders created after this time in seconds
start_offset (int, optional): the numeric offset to start the list (for pagination)
end_at (int, optional): get orders created before this time in seconds
limit (int, optional): how many orders to return (for pagination)
card_number_first_6 (str, optional): return orders with card numbers starting with this
card_number_last_4 (str, optional): return orders with card numbers ending with this
card_expiration_month (str, optional): return orders with this card expiration month
card_expiration_year (str, optional): return orders with this card expiration year
card_holder_first_name (str, optional): return orders with first name matching this
card_holder_last_name (str, optional): return orders with last name matching this
store_id (str, optional): return orders from this store
"""
Sample Request
doc, status_code = poynt.Order.get_orders(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
start_offset=0,
limit=1
)
if status_code < 300:
print(doc)
Sample Response
{u'count': 20, u'orders': [{u'transactions': [{u'status': u'CAPTURED', u'adjusted': True, u'links': [{u'href': u'1b622bd1-c0db-4271-9fe1-4ed9fbf6610c', u'method': u'GET', u'rel': u'CAPTURE'}], u'voided': False, u'fundingSource': {u'entryDetails': {u'customerPresenceStatus': u'PRESENT', u'entryMode': u'INTEGRATED_CIRCUIT_CARD'}, u'emvData': {u'emvTags': {u'0x5F34': u'02', u'0x9C': u'00', u'0x9B': u'E800', u'0x9F27': u'80', u'0x9F26': u'376393F3F6B156AA', u'0x9F03': u'000000000000', u'0x9F02': u'000000000625', u'0x9F06': u'A0000000031010', u'0x9F37': u'94F3A4C5', u'0x9A': u'170202', u'0x9F33': u'E0F0C8', u'0x84': u'A0000000031010', u'0x5F2A': u'0840', u'0x82': u'3C00', u'0x9F1A': u'0840', u'0x5F24': u'190831', u'0x9F36': u'0036', u'0x5F20': u'4C554B2F4C415752454E434520', u'0x9F34': u'5E0000', u'0x9F35': u'21', u'0x9F10': u'06010A03A0A802', u'0x9F12': u'43484153452056495341', u'0x50': u'5649534120435245444954', u'0x95': u'0080008000'}}, u'type': u'CREDIT_DEBIT', u'card': {u'status': u'ACTIVE', u'expirationMonth': 8, u'cardHolderFullName': u'LUK/LAWRENCE', u'cardHolderLastName': u'LUK', u'cardHolderFirstName': u'LAWRENCE', u'expirationYear': 2019, u'expirationDate': 31, u'numberLast4': u'4308', u'type': u'VISA', u'id': 244219, u'numberFirst6': u'414720'}, u'debit': False}, u'references': [{u'type': u'POYNT_ORDER', u'id': u'01a0c6f9-015a-1000-e3ce-bbbd758e32de'}], u'updatedAt': u'2017-02-03T02:34:14Z', u'processorResponse': {u'status': u'Successful', u'approvalCode': u'534216', u'retrievalRefNum': u'624fbc0f-794c-4866-a211-0f5be53b8345', u'batchId': u'1', u'emvTags': {u'0x8A': u'3030', u'0x89': u'454139324645'}, u'statusMessage': u'Successful', u'approvedAmount': 625, u'transactionId': u'624fbc0f-794c-4866-a211-0f5be53b8345', u'processor': u'MOCK', u'acquirer': u'CHASE_PAYMENTECH', u'statusCode': u'1'}, u'id': u'624fbc0f-794c-4866-a211-0f5be53b8345', u'createdAt': u'2017-02-03T01:40:09Z', u'amounts': {u'tipAmount': 68, u'cashbackAmount': 0, u'currency': u'USD', u'customerOptedNoTip': False, u'orderAmount': 625, u'transactionAmount': 693}, u'customerUserId': 5249839, u'partiallyApproved': False, u'authOnly': False, u'amountsAdjusted': True, u'pinCaptured': False, u'signatureRequired': False, u'actionVoid': False, u'signatureCaptured': True, u'context': {u'businessType': u'TEST_MERCHANT', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'storeId': u'c394627f-4f68-47fb-90a5-684ea801a352', u'mcc': u'5812', u'sourceApp': u'co.poynt.services', u'source': u'INSTORE', u'employeeUserId': 5247870, u'transmissionAtLocal': u'2017-02-03T01:40:08Z', u'storeDeviceId': u'urn:tid:48c54303-6d51-39af-bdeb-4af53f621652'}, u'action': u'AUTHORIZE', u'settled': False}, {u'status': u'CAPTURED', u'adjusted': False, u'links': [{u'href': u'624fbc0f-794c-4866-a211-0f5be53b8345', u'method': u'GET', u'rel': u'AUTHORIZE'}], u'voided': False, u'fundingSource': {u'entryDetails': {u'customerPresenceStatus': u'PRESENT', u'entryMode': u'INTEGRATED_CIRCUIT_CARD'}, u'type': u'CREDIT_DEBIT', u'card': {u'status': u'ACTIVE', u'expirationMonth': 8, u'cardHolderFullName': u'LUK/LAWRENCE', u'cardHolderLastName': u'LUK', u'cardHolderFirstName': u'LAWRENCE', u'expirationYear': 2019, u'expirationDate': 31, u'numberLast4': u'4308', u'type': u'VISA', u'id': 244219, u'numberFirst6': u'414720'}, u'debit': False}, u'references': [{u'type': u'POYNT_ORDER', u'id': u'01a0c6f9-015a-1000-e3ce-bbbd758e32de'}], u'updatedAt': u'2017-02-03T02:34:14Z', u'processorResponse': {u'status': u'Successful', u'approvalCode': u'283042', u'batchId': u'1', u'acquirer': u'CHASE_PAYMENTECH', u'transactionId': u'1b622bd1-c0db-4271-9fe1-4ed9fbf6610c', u'processor': u'MOCK', u'statusMessage': u'Successful', u'statusCode': u'1'}, u'id': u'1b622bd1-c0db-4271-9fe1-4ed9fbf6610c', u'createdAt': u'2017-02-03T02:34:14Z', u'amounts': {u'tipAmount': 68, u'cashbackAmount': 0, u'currency': u'USD', u'customerOptedNoTip': False, u'orderAmount': 625, u'transactionAmount': 693}, u'customerUserId': 5249839, u'partiallyApproved': False, u'parentId': u'624fbc0f-794c-4866-a211-0f5be53b8345', u'authOnly': False, u'amountsAdjusted': False, u'pinCaptured': False, u'signatureRequired': False, u'actionVoid': False, u'signatureCaptured': True, u'context': {u'businessType': u'TEST_MERCHANT', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'storeId': u'c394627f-4f68-47fb-90a5-684ea801a352', u'mcc': u'5812', u'source': u'INSTORE', u'employeeUserId': 5247870, u'storeDeviceId': u'urn:tid:48c54303-6d51-39af-bdeb-4af53f621652'}, u'action': u'CAPTURE', u'settled': False}], u'amounts': {u'netTotal': 625, u'capturedTotals': {u'currency': u'USD', u'tipAmount': 68, u'transactionAmount': 693, u'cashbackAmount': 0, u'orderAmount': 625}, u'currency': u'USD', u'discountTotal': 0, u'feeTotal': 0, u'subTotal': 625, u'taxTotal': 0}, u'items': [{u'status': u'FULFILLED', u'sku': u'water', u'unitOfMeasure': u'EACH', u'fee': 0, u'name': u'water', u'tax': 0, u'discount': 0, u'updatedAt': u'2017-02-03T01:40:21Z', u'taxExempted': False, u'productId': u'f9faac3a-be56-4bff-b60b-84987cf021cb', u'unitPrice': 125, u'id': 1, u'createdAt': u'2017-02-03T01:40:21Z', u'quantity': 5.0}], u'customerUserId': 5249839, u'orderNumber': u'4', u'statuses': {u'status': u'OPENED', u'transactionStatusSummary': u'COMPLETED', u'fulfillmentStatus': u'FULFILLED'}, u'context': {u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'storeId': u'c394627f-4f68-47fb-90a5-684ea801a352', u'source': u'INSTORE', u'employeeUserId': 5247870, u'storeDeviceId': u'urn:tid:48c54303-6d51-39af-bdeb-4af53f621652', u'transactionInstruction': u'NONE'}, u'updatedAt': u'2017-02-03T01:40:21Z', u'taxExempted': False, u'id': u'01a0c6f9-015a-1000-e3ce-bbbd758e32de', u'createdAt': u'2017-02-03T01:40:21Z'}], u'links': [{u'href': u'/businesses/18f071cc-5ed4-4b33-80c1-305056d42bfb/orders?startAt=2017-02-03T02%3A34%3A14Z&endAt=2017-08-28T06%3A46%3A08Z&limit=1', u'method': u'GET', u'rel': u'next'}]}
Get all orders
Get all orders that match the specified filters. If no filter is specified it will fetch all orders for the business since it started. We currently return 10 records at a time with a HATEOS link to the next 10. The following optional filters are supported:
- startTimeSec: the time from which to start fetching transactions,
- limit: the number of order to fetch,
- cardNumberFirst6: limit results to orders with transactions done by cards starting with these 6 numbers,
- cardNumberLast4: limit results to orders with transactions done by cards ending with these 4 numbers,
- cardExpirationMonth: limit results to orders with transactions done by cards expiring in this month,
- cardExpirationYear: limit results to orders with transactions done by cards expiring in this year,
- cardHolderFirstName: limit results to orders with transactions done by cards with this card holder first name,
- cardHolderLastName: limit results to orders with transactions done by cards with this card holder last name,
- storeId: only fetch transactions for this store.
Arguments
businessId
path- string (required)
If-Modified-Since
header- string (optional)
startAt
query- string (optional)
startOffset
query- integer (optional)
endAt
query- string (optional)
limit
query- integer (optional)
cardNumberFirst6
query- string (optional)
cardNumberLast4
query- string (optional)
cardExpirationMonth
query- integer (optional)
cardExpirationYear
query- integer (optional)
cardHolderFirstName
query- string (optional)
cardHolderLastName
query- string (optional)
storeId
query- string (optional)
includeStaysAll
query- boolean (optional)
Response
Returns a OrderList.
Definition
PUT /businesses/{businessId}/orders/{orderId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
This method is currently not possible using the Node.js SDK.
Definition
This method is currently not possible using the Python SDK.
Record order
Record an order that has already happened. A full order object must be populated as this operation will simply record what is passed to it.
Arguments
Poynt-Request-Id
header- string (required)
businessId
path- string (required)
orderId
path- string (required)
order
body- Order (optional)
Response
Returns a Order.
Definition
PATCH /businesses/{businessId}/orders/{orderId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
This method is currently not possible using the Node.js SDK.
Definition
This method is currently not possible using the Python SDK.
Update order
Update an order. This takes a JsonPatch object as request. We allow updates to order level amounts and replace on /items and /discounts.
Arguments
Poynt-Request-Id
header- string (required)
businessId
path- string (required)
orderId
path- string (required)
patch
body- JsonPatch (optional)
Response
Returns a Order.
Definition
GET /businesses/{businessId}/orders/{orderId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getOrders = function getOrders(options, next) { ... }
/**
* Get all orders at a business.
* @param {String} options.businessId
* @param {String} options.startAt (optional) - the time from which to start fetching orders
* @param {Integer} options.startOffset (optional)
* @param {String} options.endAt (optional) - the time at which to stop fetching orders
* @param {Integer} options.limit (optional) - the number of orders to fetch
* @param {String} options.cardNumberFirst6 (optional) - limit results to orders with transactions done by cards starting with these 6 numbers
* @param {String} options.cardNumberLast4 (optional) - limit results to orders with transactions done by cards ending with these 4 numbers
* @param {Integer} options.cardExpirationMonth (optional) - limit results to orders with transactions done by cards expiring in this month
* @param {Integer} options.cardExpirationYear (optional) - limit results to orders with transactions done by cards expiring in this year
* @param {String} options.cardHolderFirstName (optional) - limit results to orders with transactions done by cards with this card holder first name
* @param {String} options.cardHolderLastName (optional) - limit results to orders with transactions done by cards with this card holder last name
* @param {String} options.storeId (optional) - only fetch orders for this store
* @param {String} options.includeStaysAll (optional)
* @return {OrderList} orders
*/
Sample Request
poynt.getOrder({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
orderId : '01a0c6f9-015a-1000-e3ce-bbbd758e32de'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
})
Sample Response
{
"amounts": {
"capturedTotals": {
"cashbackAmount": 0,
"currency": "USD",
"orderAmount": 625,
"tipAmount": 68,
"transactionAmount": 693
},
"currency": "USD",
"discountTotal": 0,
"feeTotal": 0,
"netTotal": 625,
"subTotal": 625,
"taxTotal": 0
},
"context": {
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"employeeUserId": 5247870,
"source": "INSTORE",
"storeDeviceId": "urn:tid:48c54303-6d51-39af-bdeb-4af53f621652",
"storeId": "c394627f-4f68-47fb-90a5-684ea801a352",
"transactionInstruction": "NONE"
},
"createdAt": "2017-02-03T01:40:21Z",
"customerUserId": 5249839,
"discounts": [],
"fees": [],
"id": "01a0c6f9-015a-1000-e3ce-bbbd758e32de",
"items": [
{
"createdAt": "2017-02-03T01:40:21Z",
"discount": 0,
"discounts": [],
"fee": 0,
"fees": [],
"id": 1,
"name": "water",
"productId": "f9faac3a-be56-4bff-b60b-84987cf021cb",
"quantity": 5,
"selectedVariants": [],
"sku": "water",
"status": "FULFILLED",
"tax": 0,
"taxExempted": false,
"taxes": [],
"unitOfMeasure": "EACH",
"unitPrice": 125,
"updatedAt": "2017-02-03T01:40:21Z"
}
],
"orderNumber": "4",
"statuses": {
"fulfillmentStatus": "FULFILLED",
"status": "OPENED",
"transactionStatusSummary": "COMPLETED"
},
"taxExempted": false,
"transactions": [
{
"action": "AUTHORIZE",
"actionVoid": false,
"adjusted": true,
"amounts": {
"cashbackAmount": 0,
"currency": "USD",
"customerOptedNoTip": false,
"orderAmount": 625,
"tipAmount": 68,
"transactionAmount": 693
},
"amountsAdjusted": true,
"authOnly": false,
"context": {
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"businessType": "TEST_MERCHANT",
"employeeUserId": 5247870,
"mcc": "5812",
"source": "INSTORE",
"sourceApp": "co.poynt.services",
"storeDeviceId": "urn:tid:48c54303-6d51-39af-bdeb-4af53f621652",
"storeId": "c394627f-4f68-47fb-90a5-684ea801a352",
"transmissionAtLocal": "2017-02-03T01:40:08Z"
},
"createdAt": "2017-02-03T01:40:09Z",
"customerUserId": 5249839,
"fundingSource": {
"card": {
"cardHolderFirstName": "LAWRENCE",
"cardHolderFullName": "LUK/LAWRENCE",
"cardHolderLastName": "LUK",
"expirationDate": 31,
"expirationMonth": 8,
"expirationYear": 2019,
"id": 244219,
"numberFirst6": "414720",
"numberLast4": "4308",
"status": "ACTIVE",
"type": "VISA"
},
"debit": false,
"emvData": {
"emvTags": {
"0x50": "5649534120435245444954",
"0x5F20": "4C554B2F4C415752454E434520",
"0x5F24": "190831",
"0x5F2A": "0840",
"0x5F34": "02",
"0x82": "3C00",
"0x84": "A0000000031010",
"0x95": "0080008000",
"0x9A": "170202",
"0x9B": "E800",
"0x9C": "00",
"0x9F02": "000000000625",
"0x9F03": "000000000000",
"0x9F06": "A0000000031010",
"0x9F10": "06010A03A0A802",
"0x9F12": "43484153452056495341",
"0x9F1A": "0840",
"0x9F26": "376393F3F6B156AA",
"0x9F27": "80",
"0x9F33": "E0F0C8",
"0x9F34": "5E0000",
"0x9F35": "21",
"0x9F36": "0036",
"0x9F37": "94F3A4C5"
}
},
"entryDetails": {
"customerPresenceStatus": "PRESENT",
"entryMode": "INTEGRATED_CIRCUIT_CARD"
},
"type": "CREDIT_DEBIT"
},
"id": "624fbc0f-794c-4866-a211-0f5be53b8345",
"links": [
{
"href": "1b622bd1-c0db-4271-9fe1-4ed9fbf6610c",
"method": "GET",
"rel": "CAPTURE"
}
],
"partiallyApproved": false,
"pinCaptured": false,
"processorResponse": {
"acquirer": "CHASE_PAYMENTECH",
"approvalCode": "534216",
"approvedAmount": 625,
"batchId": "1",
"emvTags": {
"0x89": "454139324645",
"0x8A": "3030"
},
"processor": "MOCK",
"retrievalRefNum": "624fbc0f-794c-4866-a211-0f5be53b8345",
"status": "Successful",
"statusCode": "1",
"statusMessage": "Successful",
"transactionId": "624fbc0f-794c-4866-a211-0f5be53b8345"
},
"references": [
{
"id": "01a0c6f9-015a-1000-e3ce-bbbd758e32de",
"type": "POYNT_ORDER"
}
],
"settled": false,
"signatureCaptured": true,
"signatureRequired": false,
"status": "CAPTURED",
"updatedAt": "2017-02-03T02:34:14Z",
"voided": false
},
{
"action": "CAPTURE",
"actionVoid": false,
"adjusted": false,
"amounts": {
"cashbackAmount": 0,
"currency": "USD",
"customerOptedNoTip": false,
"orderAmount": 625,
"tipAmount": 68,
"transactionAmount": 693
},
"amountsAdjusted": false,
"authOnly": false,
"context": {
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"businessType": "TEST_MERCHANT",
"employeeUserId": 5247870,
"mcc": "5812",
"source": "INSTORE",
"storeDeviceId": "urn:tid:48c54303-6d51-39af-bdeb-4af53f621652",
"storeId": "c394627f-4f68-47fb-90a5-684ea801a352"
},
"createdAt": "2017-02-03T02:34:14Z",
"customerUserId": 5249839,
"fundingSource": {
"card": {
"cardHolderFirstName": "LAWRENCE",
"cardHolderFullName": "LUK/LAWRENCE",
"cardHolderLastName": "LUK",
"expirationDate": 31,
"expirationMonth": 8,
"expirationYear": 2019,
"id": 244219,
"numberFirst6": "414720",
"numberLast4": "4308",
"status": "ACTIVE",
"type": "VISA"
},
"debit": false,
"entryDetails": {
"customerPresenceStatus": "PRESENT",
"entryMode": "INTEGRATED_CIRCUIT_CARD"
},
"type": "CREDIT_DEBIT"
},
"id": "1b622bd1-c0db-4271-9fe1-4ed9fbf6610c",
"links": [
{
"href": "624fbc0f-794c-4866-a211-0f5be53b8345",
"method": "GET",
"rel": "AUTHORIZE"
}
],
"parentId": "624fbc0f-794c-4866-a211-0f5be53b8345",
"partiallyApproved": false,
"pinCaptured": false,
"processorResponse": {
"acquirer": "CHASE_PAYMENTECH",
"approvalCode": "283042",
"batchId": "1",
"processor": "MOCK",
"status": "Successful",
"statusCode": "1",
"statusMessage": "Successful",
"transactionId": "1b622bd1-c0db-4271-9fe1-4ed9fbf6610c"
},
"references": [
{
"id": "01a0c6f9-015a-1000-e3ce-bbbd758e32de",
"type": "POYNT_ORDER"
}
],
"settled": false,
"signatureCaptured": true,
"signatureRequired": false,
"status": "CAPTURED",
"updatedAt": "2017-02-03T02:34:14Z",
"voided": false
}
],
"updatedAt": "2017-02-03T01:40:21Z"
}
Definition
@classmethod
def get_orders(cls, business_id, start_at=None, start_offset=None,
end_at=None, limit=None, card_number_first_6=None,
card_number_last_4=None, card_expiration_month=None,
card_expiration_year=None, card_holder_first_name=None,
card_holder_last_name=None, store_id=None):
"""
Get all orders at a business by various criteria.
Arguments:
business_id (str): the business ID
Keyword arguments:
start_at (int, optional): get orders created after this time in seconds
start_offset (int, optional): the numeric offset to start the list (for pagination)
end_at (int, optional): get orders created before this time in seconds
limit (int, optional): how many orders to return (for pagination)
card_number_first_6 (str, optional): return orders with card numbers starting with this
card_number_last_4 (str, optional): return orders with card numbers ending with this
card_expiration_month (str, optional): return orders with this card expiration month
card_expiration_year (str, optional): return orders with this card expiration year
card_holder_first_name (str, optional): return orders with first name matching this
card_holder_last_name (str, optional): return orders with last name matching this
store_id (str, optional): return orders from this store
"""
Sample Request
doc, status_code = poynt.Order.get_order(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'01a0c6f9-015a-1000-e3ce-bbbd758e32de'
)
if status_code < 300:
print(doc)
Sample Response
{u'transactions': [{u'status': u'CAPTURED', u'adjusted': True, u'links': [{u'href': u'1b622bd1-c0db-4271-9fe1-4ed9fbf6610c', u'method': u'GET', u'rel': u'CAPTURE'}], u'voided': False, u'fundingSource': {u'entryDetails': {u'customerPresenceStatus': u'PRESENT', u'entryMode': u'INTEGRATED_CIRCUIT_CARD'}, u'emvData': {u'emvTags': {u'0x5F34': u'02', u'0x9C': u'00', u'0x9B': u'E800', u'0x9F27': u'80', u'0x9F26': u'376393F3F6B156AA', u'0x9F03': u'000000000000', u'0x9F02': u'000000000625', u'0x9F06': u'A0000000031010', u'0x9F37': u'94F3A4C5', u'0x9A': u'170202', u'0x9F33': u'E0F0C8', u'0x84': u'A0000000031010', u'0x5F2A': u'0840', u'0x82': u'3C00', u'0x9F1A': u'0840', u'0x5F24': u'190831', u'0x9F36': u'0036', u'0x5F20': u'4C554B2F4C415752454E434520', u'0x9F34': u'5E0000', u'0x9F35': u'21', u'0x9F10': u'06010A03A0A802', u'0x9F12': u'43484153452056495341', u'0x50': u'5649534120435245444954', u'0x95': u'0080008000'}}, u'type': u'CREDIT_DEBIT', u'card': {u'status': u'ACTIVE', u'expirationMonth': 8, u'cardHolderFullName': u'LUK/LAWRENCE', u'cardHolderLastName': u'LUK', u'cardHolderFirstName': u'LAWRENCE', u'expirationYear': 2019, u'expirationDate': 31, u'numberLast4': u'4308', u'type': u'VISA', u'id': 244219, u'numberFirst6': u'414720'}, u'debit': False}, u'references': [{u'type': u'POYNT_ORDER', u'id': u'01a0c6f9-015a-1000-e3ce-bbbd758e32de'}], u'updatedAt': u'2017-02-03T02:34:14Z', u'processorResponse': {u'status': u'Successful', u'approvalCode': u'534216', u'retrievalRefNum': u'624fbc0f-794c-4866-a211-0f5be53b8345', u'batchId': u'1', u'emvTags': {u'0x8A': u'3030', u'0x89': u'454139324645'}, u'statusMessage': u'Successful', u'approvedAmount': 625, u'transactionId': u'624fbc0f-794c-4866-a211-0f5be53b8345', u'processor': u'MOCK', u'acquirer': u'CHASE_PAYMENTECH', u'statusCode': u'1'}, u'id': u'624fbc0f-794c-4866-a211-0f5be53b8345', u'createdAt': u'2017-02-03T01:40:09Z', u'amounts': {u'tipAmount': 68, u'cashbackAmount': 0, u'currency': u'USD', u'customerOptedNoTip': False, u'orderAmount': 625, u'transactionAmount': 693}, u'customerUserId': 5249839, u'partiallyApproved': False, u'authOnly': False, u'amountsAdjusted': True, u'pinCaptured': False, u'signatureRequired': False, u'actionVoid': False, u'signatureCaptured': True, u'context': {u'businessType': u'TEST_MERCHANT', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'storeId': u'c394627f-4f68-47fb-90a5-684ea801a352', u'mcc': u'5812', u'sourceApp': u'co.poynt.services', u'source': u'INSTORE', u'employeeUserId': 5247870, u'transmissionAtLocal': u'2017-02-03T01:40:08Z', u'storeDeviceId': u'urn:tid:48c54303-6d51-39af-bdeb-4af53f621652'}, u'action': u'AUTHORIZE', u'settled': False}, {u'status': u'CAPTURED', u'adjusted': False, u'links': [{u'href': u'624fbc0f-794c-4866-a211-0f5be53b8345', u'method': u'GET', u'rel': u'AUTHORIZE'}], u'voided': False, u'fundingSource': {u'entryDetails': {u'customerPresenceStatus': u'PRESENT', u'entryMode': u'INTEGRATED_CIRCUIT_CARD'}, u'type': u'CREDIT_DEBIT', u'card': {u'status': u'ACTIVE', u'expirationMonth': 8, u'cardHolderFullName': u'LUK/LAWRENCE', u'cardHolderLastName': u'LUK', u'cardHolderFirstName': u'LAWRENCE', u'expirationYear': 2019, u'expirationDate': 31, u'numberLast4': u'4308', u'type': u'VISA', u'id': 244219, u'numberFirst6': u'414720'}, u'debit': False}, u'references': [{u'type': u'POYNT_ORDER', u'id': u'01a0c6f9-015a-1000-e3ce-bbbd758e32de'}], u'updatedAt': u'2017-02-03T02:34:14Z', u'processorResponse': {u'status': u'Successful', u'approvalCode': u'283042', u'batchId': u'1', u'acquirer': u'CHASE_PAYMENTECH', u'transactionId': u'1b622bd1-c0db-4271-9fe1-4ed9fbf6610c', u'processor': u'MOCK', u'statusMessage': u'Successful', u'statusCode': u'1'}, u'id': u'1b622bd1-c0db-4271-9fe1-4ed9fbf6610c', u'createdAt': u'2017-02-03T02:34:14Z', u'amounts': {u'tipAmount': 68, u'cashbackAmount': 0, u'currency': u'USD', u'customerOptedNoTip': False, u'orderAmount': 625, u'transactionAmount': 693}, u'customerUserId': 5249839, u'partiallyApproved': False, u'parentId': u'624fbc0f-794c-4866-a211-0f5be53b8345', u'authOnly': False, u'amountsAdjusted': False, u'pinCaptured': False, u'signatureRequired': False, u'actionVoid': False, u'signatureCaptured': True, u'context': {u'businessType': u'TEST_MERCHANT', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'storeId': u'c394627f-4f68-47fb-90a5-684ea801a352', u'mcc': u'5812', u'source': u'INSTORE', u'employeeUserId': 5247870, u'storeDeviceId': u'urn:tid:48c54303-6d51-39af-bdeb-4af53f621652'}, u'action': u'CAPTURE', u'settled': False}], u'amounts': {u'netTotal': 625, u'capturedTotals': {u'currency': u'USD', u'tipAmount': 68, u'transactionAmount': 693, u'cashbackAmount': 0, u'orderAmount': 625}, u'currency': u'USD', u'discountTotal': 0, u'feeTotal': 0, u'subTotal': 625, u'taxTotal': 0}, u'items': [{u'status': u'FULFILLED', u'sku': u'water', u'unitOfMeasure': u'EACH', u'fee': 0, u'name': u'water', u'discount': 0, u'selectedVariants': [], u'fees': [], u'tax': 0, u'taxes': [], u'discounts': [], u'updatedAt': u'2017-02-03T01:40:21Z', u'taxExempted': False, u'productId': u'f9faac3a-be56-4bff-b60b-84987cf021cb', u'unitPrice': 125, u'id': 1, u'createdAt': u'2017-02-03T01:40:21Z', u'quantity': 5.0}], u'updatedAt': u'2017-02-03T01:40:21Z', u'customerUserId': 5249839, u'orderNumber': u'4', u'discounts': [], u'statuses': {u'status': u'OPENED', u'transactionStatusSummary': u'COMPLETED', u'fulfillmentStatus': u'FULFILLED'}, u'context': {u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'storeId': u'c394627f-4f68-47fb-90a5-684ea801a352', u'source': u'INSTORE', u'employeeUserId': 5247870, u'storeDeviceId': u'urn:tid:48c54303-6d51-39af-bdeb-4af53f621652', u'transactionInstruction': u'NONE'}, u'fees': [], u'taxExempted': False, u'id': u'01a0c6f9-015a-1000-e3ce-bbbd758e32de', u'createdAt': u'2017-02-03T01:40:21Z'}
Get an order
Get an order (along with HATEOS links to all immediately related orders).
Arguments
If-Modified-Since
header- string (optional)
businessId
path- string (required)
orderId
path- string (required)
Response
Returns a Order.
Definition
POST /businesses/{businessId}/orders/{orderId}/cancel
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
This method is currently not possible using the Node.js SDK.
Definition
This method is currently not possible using the Python SDK.
Cancel order
(DEPRECATED) This is a convenience operation that will undo everything in this order.
Arguments
Poynt-Request-Id
header- string (required)
businessId
path- string (required)
orderId
path- string (required)
Response
Returns a Order.
Transactions
Transactions resource represents a financial transaction. It has operations to manage the entire lifecycle of a transaction initiated through MSR, manual key-in, NFC or EMV. It provides operations to:
- save a transaction at the Poynt server for later processing,
- record a transaction that has already happened -- maybe offline or through some other path with the acquirer,
- initiate interaction with the acquirer to move funds (for a previously saved transaction or a brand new transaction),
- capture, void or update a previously authorized transaction,
- refund a previously completed transaction,
- record EMV tags associated with an authorized transaction or
- get details about all transactions meeting a certain filter criteria.
Definition
GET /businesses/{businessId}/transactions
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getTransactions = function getTransactions(options, next) { ... }
/**
* Get all transactions that match the specified filters.
* If no filter is specified it will fetch all transactions for the business
* since it started.
* @param {String} options.businessId
* @param {String} options.startAt (optional) - the time from which to start fetching transactions
* @param {Integer} options.startOffset (optional)
* @param {String} options.endAt (optional) - the time at which to stop fetching transactions
* @param {Integer} options.limit (optional) - the number of transactions to fetch
* @param {String} options.storeId (optional) - only fetch transactions for this store
* @param {String} options.deviceId (optional) - only fetch transactions for this device
* @param {String} options.searchKey (optional) - instead of specifying which exact field to look at, the client can simply pass this search key and the server will look at various different fields,
* @param {String} options.cardNumberFirst6 (optional) - limit results to transactions done by cards starting with these 6 numbers
* @param {String} options.cardNumberLast4 (optional) - limit results to transactions done by cards ending with these 4 numbers
* @param {Integer} options.cardExpirationMonth (optional) - limit results to transactions done by cards expiring in this month
* @param {Integer} options.cardExpirationYear (optional) - limit results to transactions done by cards expiring in this year
* @param {String} options.cardHolderFirstName (optional) - limit results to transactions done by cards with this card holder first name
* @param {String} options.cardHolderLastName (optional) - limit results to transactions done by cards with this card holder last name
* @param {String} options.action (optional) - only fetch transactions with this action
* @param {String} options.status (optional) - only fetch transactions with this status
* @param {String} options.transactionIds (optional) - only fetch transactions matching these ids (comma separated)
* @param {Boolean} options.authOnly (optional) - only fetch auth only transactions
* @param {Boolean} options.unsettledOnly (optional) - only fetch unsettled transactions
* @param {Boolean} options.creditDebitOnly (optional) - only fetch credit/debit transactions
* @return {TransactionList} transactions
*/
Sample Request
poynt.getTransactions({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
startOffset : 0,
limit : 1
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
})
Sample Response
{
"count": 256,
"links": [
{
"href": "/businesses/18f071cc-5ed4-4b33-80c1-305056d42bfb/transactions?startAt=2017-01-04T23%3A10%3A25Z&endAt=2017-08-28T06%3A56%3A17Z&limit=1",
"method": "GET",
"rel": "next"
}
],
"transactions": [
{
"action": "AUTHORIZE",
"actionVoid": false,
"adjusted": false,
"amounts": {
"cashbackAmount": 0,
"currency": "USD",
"customerOptedNoTip": false,
"orderAmount": 800,
"tipAmount": 0,
"transactionAmount": 800
},
"amountsAdjusted": false,
"authOnly": false,
"context": {
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"businessType": "TEST_MERCHANT",
"employeeUserId": 5247838,
"mcc": "5812",
"source": "INSTORE",
"sourceApp": "co.poynt.services",
"storeDeviceId": "urn:tid:48c54303-6d51-39af-bdeb-4af53f621652",
"storeId": "c394627f-4f68-47fb-90a5-684ea801a352",
"transmissionAtLocal": "2017-01-04T22:20:40Z"
},
"createdAt": "2017-01-04T22:20:40Z",
"customerUserId": 5247839,
"fundingSource": {
"card": {
"cardHolderFirstName": "",
"cardHolderFullName": "/",
"cardHolderLastName": "",
"expirationDate": 31,
"expirationMonth": 8,
"expirationYear": 2022,
"id": 243043,
"numberFirst6": "405413",
"numberLast4": "0833",
"status": "ACTIVE",
"type": "VISA"
},
"debit": false,
"emvData": {
"emvTags": {
"0x5F20": "202F",
"0x5F24": "220831",
"0x9C": "00",
"0x9F02": "000000000800",
"0x9F06": "A0000000031010",
"0x9F37": "7619D4A6"
}
},
"entryDetails": {
"customerPresenceStatus": "PRESENT",
"entryMode": "CONTACTLESS_MAGSTRIPE"
},
"type": "CREDIT_DEBIT"
},
"id": "9ee28946-cab1-48af-b30b-d111716128a2",
"partiallyApproved": false,
"pinCaptured": false,
"processorResponse": {
"acquirer": "CHASE_PAYMENTECH",
"approvalCode": "667149",
"approvedAmount": 800,
"batchId": "1",
"processor": "MOCK",
"retrievalRefNum": "9ee28946-cab1-48af-b30b-d111716128a2",
"status": "Successful",
"statusCode": "1",
"statusMessage": "Successful",
"transactionId": "9ee28946-cab1-48af-b30b-d111716128a2"
},
"references": [
{
"customType": "referenceId",
"id": "6b91d9a0-0159-1000-6f82-44ed3d4b4a5a",
"type": "CUSTOM"
}
],
"settled": false,
"signatureCaptured": true,
"signatureRequired": false,
"status": "AUTHORIZED",
"updatedAt": "2017-01-04T22:20:40Z",
"voided": false
}
]
}
Definition
@classmethod
def get_transactions(cls, business_id, start_at=None, start_offset=None,
end_at=None, limit=None, card_number_first_6=None,
card_number_last_4=None, card_expiration_month=None,
card_expiration_year=None, card_holder_first_name=None,
card_holder_last_name=None, store_id=None, device_id=None,
search_key=None, action=None, status=None, transaction_ids=None,
auth_only=None, unsettled_only=None, credit_debit_only=None):
"""
Get all transactions at a business by various criteria.
Arguments:
business_id (str): the business ID
Keyword arguments:
start_at (int, optional): get txns created after this time in seconds
start_offset (int, optional): the numeric offset to start the list (for pagination)
end_at (int, optional): get txns created before this time in seconds
limit (int, optional): how many txns to return (for pagination)
card_number_first_6 (str, optional): return txns with card numbers starting with this
card_number_last_4 (str, optional): return txns with card numbers ending with this
card_expiration_month (str, optional): return txns with this card expiration month
card_expiration_year (str, optional): return txns with this card expiration year
card_holder_first_name (str, optional): return txns with first name matching this
card_holder_last_name (str, optional): return txns with last name matching this
store_id (str, optional): return txns from this store
device_id (str, optional): return txns from this device
search_key (str, optional): instead of specifying which exact field to look at, the
client can simply pass this search key and the server will
look at various different fields,
action (str, optional): only fetch txns with this action
status (str, optional): only fetch txns with this status
transaction_ids (str, optional): only fetch txns matching these ids (comma separated)
auth_only (bool, optional): only fetch auth only txns
unsettled_only (bool, optional): only fetch unsettled txns
credit_debit_only (bool, optional): only fetch credit/debit txns
"""
Sample Request
doc, status_code = poynt.Transaction.get_transactions(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
start_offset=0,
limit=1
)
if status_code < 300:
print(doc)
Sample Response
{u'count': 256, u'links': [{u'href': u'/businesses/18f071cc-5ed4-4b33-80c1-305056d42bfb/transactions?startAt=2017-01-04T23%3A10%3A25Z&endAt=2017-08-28T06%3A57%3A16Z&limit=1', u'method': u'GET', u'rel': u'next'}], u'transactions': [{u'authOnly': False, u'status': u'AUTHORIZED', u'adjusted': False, u'context': {u'businessType': u'TEST_MERCHANT', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'storeId': u'c394627f-4f68-47fb-90a5-684ea801a352', u'mcc': u'5812', u'sourceApp': u'co.poynt.services', u'source': u'INSTORE', u'employeeUserId': 5247838, u'transmissionAtLocal': u'2017-01-04T22:20:40Z', u'storeDeviceId': u'urn:tid:48c54303-6d51-39af-bdeb-4af53f621652'}, u'pinCaptured': False, u'id': u'9ee28946-cab1-48af-b30b-d111716128a2', u'action': u'AUTHORIZE', u'customerUserId': 5247839, u'amountsAdjusted': False, u'partiallyApproved': False, u'voided': False, u'signatureRequired': False, u'fundingSource': {u'entryDetails': {u'customerPresenceStatus': u'PRESENT', u'entryMode': u'CONTACTLESS_MAGSTRIPE'}, u'emvData': {u'emvTags': {u'0x5F24': u'220831', u'0x9C': u'00', u'0x5F20': u'202F', u'0x9F02': u'000000000800', u'0x9F06': u'A0000000031010', u'0x9F37': u'7619D4A6'}}, u'type': u'CREDIT_DEBIT', u'card': {u'status': u'ACTIVE', u'expirationMonth': 8, u'cardHolderFullName': u'/', u'cardHolderLastName': u'', u'cardHolderFirstName': u'', u'expirationYear': 2022, u'expirationDate': 31, u'numberLast4': u'0833', u'type': u'VISA', u'id': 243043, u'numberFirst6': u'405413'}, u'debit': False}, u'amounts': {u'tipAmount': 0, u'cashbackAmount': 0, u'currency': u'USD', u'customerOptedNoTip': False, u'orderAmount': 800, u'transactionAmount': 800}, u'references': [{u'customType': u'referenceId', u'type': u'CUSTOM', u'id': u'6b91d9a0-0159-1000-6f82-44ed3d4b4a5a'}], u'actionVoid': False, u'updatedAt': u'2017-01-04T22:20:40Z', u'processorResponse': {u'status': u'Successful', u'approvalCode': u'667149', u'retrievalRefNum': u'9ee28946-cab1-48af-b30b-d111716128a2', u'batchId': u'1', u'acquirer': u'CHASE_PAYMENTECH', u'approvedAmount': 800, u'transactionId': u'9ee28946-cab1-48af-b30b-d111716128a2', u'processor': u'MOCK', u'statusMessage': u'Successful', u'statusCode': u'1'}, u'settled': False, u'signatureCaptured': True, u'createdAt': u'2017-01-04T22:20:40Z'}]}
Get all transactions
Get all transactions that match the specified filters. If no filter is specified it will fetch all transactions for the business since it started. We currently return 10 records at a time with a HATEOS link to the next 10. The following optional filters are supported:
- If-Modified-Since: will only return transaction since If-Modified-Since,
- startAt: the time in seconds from which to start fetching transactions,
- startOffset: for all transactions at startAt the offset from where to start,
- endAt: the time in seconds at which to end,
- limit: the number of transactions to fetch in one go,
- storeId: only fetch transactions for this store,
- deviceId: only fetch transactions for this device,
- searchKey: instead of specifying which exact field to look at, the client can simply pass this search key and the server will look at various different fields,
- cardNumberFirst6: limit results to transactions done by cards starting with these 6 numbers,
- cardNumberLast4: limit results to transactions done by cards ending with these 4 numbers,
- cardExpirationMonth: limit results to transactions done by cards expiring in this month,
- cardExpirationYear: limit results to transactions done by cards expiring in this year,
- cardHolderFirstName: limit results to transactions done by cards with this card holder first name,
- cardHolderLastName: limit results to transactions done by cards with this card holder last name,
- transactionIds: only fetch transactions matching these transactionIds,
- authOny: only fetch authOnly transactions,
- unsettledOnly: only fetch unsettled transactions. note: this will limit result to creditDebitOnly,
- creditDebitOnly: only fetch credit-debit transactions. note: if one of the card filters or unsettledOnly filter above are enabled, it automatically limits result to credit-debit only,
Arguments
businessId
path- string (required)
If-Modified-Since
header- string (optional)
startAt
query- string (optional)
startOffset
query- integer (optional)
endAt
query- string (optional)
limit
query- integer (optional)
storeId
query- string (optional)
deviceId
query- string (optional)
searchKey
query- string (optional)
cardNumberFirst6
query- string (optional)
cardNumberLast4
query- string (optional)
cardExpirationMonth
query- integer (optional)
cardExpirationYear
query- integer (optional)
cardHolderFirstName
query- string (optional)
cardHolderLastName
query- string (optional)
action
query- string (optional)
status
query- string (optional)
transactionIds
query- array (optional)
authOnly
query- boolean (optional)
unsettledOnly
query- boolean (optional)
creditDebitOnly
query- boolean (optional)
Response
Returns a TransactionList.
Definition
PATCH /businesses/{businessId}/transactions/{transactionId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
This method is currently not possible using the Node.js SDK.
Definition
This method is currently not possible using the Python SDK.
Update transaction
Update a transaction. This only works on an authorization transaction. This takes a JsonPatch object as request. We currently support replace on all the fields in the /amounts object and an add on /receiptEmailAddress and /signature.
Arguments
Poynt-Request-Id
header- string (required)
businessId
path- string (required)
transactionId
path- string (required)
patch
body- JsonPatch (optional)
Response
Returns a Transaction.
Definition
GET /businesses/{businessId}/transactions/{transactionId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getTransaction = function getTransaction(options, next) { ... }
/**
* Get a single transaction at a business.
* @param {String} options.businessId
* @param {String} options.transactionId
* @return {Transaction} transaction
*/
Sample Request
poynt.getTransaction({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
transactionId : '9ee28946-cab1-48af-b30b-d111716128a2'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"action": "AUTHORIZE",
"actionVoid": false,
"adjusted": false,
"amounts": {
"cashbackAmount": 0,
"currency": "USD",
"customerOptedNoTip": false,
"orderAmount": 800,
"tipAmount": 0,
"transactionAmount": 800
},
"amountsAdjusted": false,
"authOnly": false,
"context": {
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"businessType": "TEST_MERCHANT",
"employeeUserId": 5247838,
"mcc": "5812",
"source": "INSTORE",
"sourceApp": "co.poynt.services",
"storeDeviceId": "urn:tid:48c54303-6d51-39af-bdeb-4af53f621652",
"storeId": "c394627f-4f68-47fb-90a5-684ea801a352",
"transmissionAtLocal": "2017-01-04T22:20:40Z"
},
"createdAt": "2017-01-04T22:20:40Z",
"customerUserId": 5247839,
"fundingSource": {
"card": {
"cardHolderFirstName": "",
"cardHolderFullName": "/",
"cardHolderLastName": "",
"expirationDate": 31,
"expirationMonth": 8,
"expirationYear": 2022,
"id": 243043,
"numberFirst6": "405413",
"numberLast4": "0833",
"status": "ACTIVE",
"type": "VISA"
},
"debit": false,
"emvData": {
"emvTags": {
"0x5F20": "202F",
"0x5F24": "220831",
"0x9C": "00",
"0x9F02": "000000000800",
"0x9F06": "A0000000031010",
"0x9F37": "7619D4A6"
}
},
"entryDetails": {
"customerPresenceStatus": "PRESENT",
"entryMode": "CONTACTLESS_MAGSTRIPE"
},
"type": "CREDIT_DEBIT"
},
"id": "9ee28946-cab1-48af-b30b-d111716128a2",
"partiallyApproved": false,
"pinCaptured": false,
"processorResponse": {
"acquirer": "CHASE_PAYMENTECH",
"approvalCode": "667149",
"approvedAmount": 800,
"batchId": "1",
"processor": "MOCK",
"retrievalRefNum": "9ee28946-cab1-48af-b30b-d111716128a2",
"status": "Successful",
"statusCode": "1",
"statusMessage": "Successful",
"transactionId": "9ee28946-cab1-48af-b30b-d111716128a2"
},
"references": [
{
"customType": "referenceId",
"id": "6b91d9a0-0159-1000-6f82-44ed3d4b4a5a",
"type": "CUSTOM"
}
],
"settled": false,
"signatureCaptured": true,
"signatureRequired": false,
"status": "AUTHORIZED",
"updatedAt": "2017-01-04T22:20:40Z",
"voided": false
}
Definition
@classmethod
def get_transaction(cls, business_id, transaction_id):
"""
Get a single transaction at a business.
Arguments:
business_id (str): the business ID
transaction_id (str): the transaction ID
"""
Sample Request
doc, status_code = poynt.Transaction.get_transaction(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'9ee28946-cab1-48af-b30b-d111716128a2'
)
if status_code < 300:
print(doc)
Sample Response
{u'authOnly': False, u'status': u'AUTHORIZED', u'adjusted': False, u'context': {u'businessType': u'TEST_MERCHANT', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'storeId': u'c394627f-4f68-47fb-90a5-684ea801a352', u'mcc': u'5812', u'sourceApp': u'co.poynt.services', u'source': u'INSTORE', u'employeeUserId': 5247838, u'transmissionAtLocal': u'2017-01-04T22:20:40Z', u'storeDeviceId': u'urn:tid:48c54303-6d51-39af-bdeb-4af53f621652'}, u'pinCaptured': False, u'id': u'9ee28946-cab1-48af-b30b-d111716128a2', u'action': u'AUTHORIZE', u'customerUserId': 5247839, u'amountsAdjusted': False, u'partiallyApproved': False, u'voided': False, u'signatureRequired': False, u'fundingSource': {u'entryDetails': {u'customerPresenceStatus': u'PRESENT', u'entryMode': u'CONTACTLESS_MAGSTRIPE'}, u'emvData': {u'emvTags': {u'0x5F24': u'220831', u'0x9C': u'00', u'0x5F20': u'202F', u'0x9F02': u'000000000800', u'0x9F06': u'A0000000031010', u'0x9F37': u'7619D4A6'}}, u'type': u'CREDIT_DEBIT', u'card': {u'status': u'ACTIVE', u'expirationMonth': 8, u'cardHolderFullName': u'/', u'cardHolderLastName': u'', u'cardHolderFirstName': u'', u'expirationYear': 2022, u'expirationDate': 31, u'numberLast4': u'0833', u'type': u'VISA', u'id': 243043, u'numberFirst6': u'405413'}, u'debit': False}, u'amounts': {u'tipAmount': 0, u'cashbackAmount': 0, u'currency': u'USD', u'customerOptedNoTip': False, u'orderAmount': 800, u'transactionAmount': 800}, u'references': [{u'customType': u'referenceId', u'type': u'CUSTOM', u'id': u'6b91d9a0-0159-1000-6f82-44ed3d4b4a5a'}], u'actionVoid': False, u'updatedAt': u'2017-01-04T22:20:40Z', u'processorResponse': {u'status': u'Successful', u'approvalCode': u'667149', u'retrievalRefNum': u'9ee28946-cab1-48af-b30b-d111716128a2', u'batchId': u'1', u'acquirer': u'CHASE_PAYMENTECH', u'approvedAmount': 800, u'transactionId': u'9ee28946-cab1-48af-b30b-d111716128a2', u'processor': u'MOCK', u'statusMessage': u'Successful', u'statusCode': u'1'}, u'settled': False, u'signatureCaptured': True, u'createdAt': u'2017-01-04T22:20:40Z'}
Get a transaction
Get a transaction (along with HATEOS links to all immediately related transactions).
Arguments
If-Modified-Since
header- string (optional)
businessId
path- string (required)
transactionId
path- string (required)
Response
Returns a Transaction.
Definition
PUT /businesses/{businessId}/transactions/{transactionId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
This method is currently not possible using the Node.js SDK.
Definition
This method is currently not possible using the Python SDK.
Record transaction
Record a transaction that has already happened. A full transaction object must be populated as this operation will simply record what is passed to it. If the references field in the body includes a POYNT_ORDER, this transaction will be attached to it.
Arguments
Poynt-Request-Id
header- string (required)
businessId
path- string (required)
transactionId
path- string (required)
transaction
body- Transaction (optional)
Response
Returns a Transaction.
Customers
Operations for customers of a business
Definition
POST /businesses/{businessId}/customers
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
This method is currently not possible using the Node.js SDK.
Definition
This method is currently not possible using the Python SDK.
Create a customer
Create a customer of a business.
Arguments
businessId
path- string (required)
customer
body- Customer (optional)
Response
Returns a Customer.
Definition
GET /businesses/{businessId}/customers
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getCustomers = function getCustomers(options, next) { ... }
/**
* Get all customers of a business by various criteria.
* @param {String} options.businessId
* @param {String} options.startAt (optional)
* @param {Integer} options.startOffset (optional)
* @param {String} options.endAt (optional)
* @param {Integer} options.limit (optional)
* @param {String} options.cardNumberFirst6 (optional)
* @param {String} options.cardNumberLast4 (optional)
* @param {Integer} options.cardExpirationMonth (optional)
* @param {Integer} options.cardExpirationYear (optional)
* @param {String} options.cardHolderFirstName (optional)
* @param {String} options.cardHolderLastName (optional)
* @return {CustomerList} customers
*/
Sample Request
poynt.getCustomers({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
startOffset : 0,
limit : 1
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"count": 37,
"customers": [
{
"attributes": {},
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"businessPreferences": {
"emailReceipt": false,
"preferredCardId": 0,
"printPaperReceipt": false,
"useCardOnFile": false
},
"cards": [
{
"cardHolderFirstName": "",
"cardHolderFullName": "/",
"cardHolderLastName": "",
"expirationDate": 31,
"expirationMonth": 8,
"expirationYear": 2022,
"id": 243043,
"numberFirst6": "405413",
"numberLast4": "0833",
"status": "ACTIVE",
"type": "VISA"
}
],
"createdAt": "2017-01-04T22:20:40Z",
"emails": {},
"firstName": "",
"id": 5247839,
"lastName": "",
"loyaltyCustomers": [],
"phones": {},
"updatedAt": "2017-01-04T22:20:40Z"
}
],
"links": [
{
"href": "/businesses/18f071cc-5ed4-4b33-80c1-305056d42bfb/customers?startAt=2017-01-06T01%3A23%3A10Z&endAt=2017-08-28T07%3A03%3A20Z&limit=1",
"method": "GET",
"rel": "next"
}
]
}
Definition
@classmethod
def get_customers(cls, business_id, start_at=None, start_offset=None,
end_at=None, limit=None, card_number_first_6=None,
card_number_last_4=None, card_expiration_month=None,
card_expiration_year=None, card_holder_first_name=None,
card_holder_last_name=None):
"""
Get all customers of a business by various criteria.
Arguments:
business_id (str): the business ID
Keyword arguments:
start_at (int, optional): get customers created after this time in seconds
start_offset (int, optional): the numeric offset to start the list (for pagination)
end_at (int, optional): get customers created before this time in seconds
limit (int, optional): how many customers to return (for pagination)
card_number_first_6 (str, optional): return customers with card numbers starting with this
card_number_last_4 (str, optional): return customers with card numbers ending with this
card_expiration_month (str, optional): return customers with this card expiration month
card_expiration_year (str, optional): return customers with this card expiration year
card_holder_first_name (str, optional): return customers with first name matching this
card_holder_last_name (str, optional): return customers with last name matching this
"""
Sample Request
doc, status_code = poynt.Customer.get_customers(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
start_offset=0,
limit=1
)
if status_code < 300:
print(doc)
Sample Response
{u'count': 37, u'customers': [{u'lastName': u'', u'loyaltyCustomers': [], u'firstName': u'', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'phones': {}, u'businessPreferences': {u'emailReceipt': False, u'preferredCardId': 0, u'printPaperReceipt': False, u'useCardOnFile': False}, u'emails': {}, u'updatedAt': u'2017-01-04T22:20:40Z', u'cards': [{u'status': u'ACTIVE', u'expirationMonth': 8, u'cardHolderFullName': u'/', u'cardHolderLastName': u'', u'cardHolderFirstName': u'', u'expirationYear': 2022, u'expirationDate': 31, u'numberLast4': u'0833', u'type': u'VISA', u'id': 243043, u'numberFirst6': u'405413'}], u'attributes': {}, u'id': 5247839, u'createdAt': u'2017-01-04T22:20:40Z'}], u'links': [{u'href': u'/businesses/18f071cc-5ed4-4b33-80c1-305056d42bfb/customers?startAt=2017-01-06T01%3A23%3A10Z&endAt=2017-08-28T07%3A03%3A53Z&limit=1', u'method': u'GET', u'rel': u'next'}]}
Search customers
Get all customers of a business by various criterias.
Arguments
businessId
path- string (required)
If-Modified-Since
header- string (optional)
startAt
query- string (optional)
startOffset
query- integer (optional)
endAt
query- string (optional)
limit
query- integer (optional)
cardNumberFirst6
query- string (optional)
cardNumberLast4
query- string (optional)
cardExpirationMonth
query- integer (optional)
cardExpirationYear
query- integer (optional)
cardHolderFirstName
query- string (optional)
cardHolderLastName
query- string (optional)
Response
Returns a CustomerList.
Definition
POST /businesses/{businessId}/customers/lookup
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
This method is currently not possible using the Node.js SDK.
Definition
This method is currently not possible using the Python SDK.
Lookup by card
Find a customer by his card.
Arguments
businessId
path- string (required)
card
body- Card (optional)
Response
Returns a array.
Definition
GET /businesses/{businessId}/customers/{customerId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getCustomer = function getCustomer(options, next) { ... }
/**
* Get a single customer at a business.
* @param {String} options.businessId
* @param {String} options.customerId
* @return {Customer} customer
*/
Sample Request
poynt.getCustomer({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
customerId : 5247839
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"createdAt": "2017-01-04T22:20:40Z",
"updatedAt": "2017-01-04T22:20:40Z",
"businessPreferences": {
"useCardOnFile": false,
"emailReceipt": false,
"printPaperReceipt": false,
"preferredCardId": 0
},
"insights": {
"since": "2017-01-04T22:20:40Z",
"scores": [
{
"score": 8.59,
"type": "OVERALL"
}
],
"totalOrders": 0
},
"cards": [
{
"type": "VISA",
"status": "ACTIVE",
"expirationDate": 31,
"expirationMonth": 8,
"expirationYear": 2022,
"id": 243043,
"numberFirst6": "405413",
"numberLast4": "0833",
"cardHolderFirstName": "",
"cardHolderLastName": "",
"cardHolderFullName": "/"
}
],
"loyaltyCustomers": [],
"id": 5247839,
"emails": {},
"phones": {},
"attributes": {},
"firstName": "",
"lastName": "",
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb"
}
Definition
@classmethod
def get_customer(cls, business_id, customer_id):
"""
Get a single customer at a business.
Arguments:
business_id (str): the business ID
customer_id (str): the customer ID
"""
Sample Request
doc, status_code = poynt.Customer.get_customer(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
5247839
)
if status_code < 300:
print(doc)
Sample Response
{u'lastName': u'', u'loyaltyCustomers': [], u'firstName': u'', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'phones': {}, u'businessPreferences': {u'emailReceipt': False, u'preferredCardId': 0, u'printPaperReceipt': False, u'useCardOnFile': False}, u'emails': {}, u'updatedAt': u'2017-01-04T22:20:40Z', u'cards': [{u'status': u'ACTIVE', u'expirationMonth': 8, u'cardHolderFullName': u'/', u'cardHolderLastName': u'', u'cardHolderFirstName': u'', u'expirationYear': 2022, u'expirationDate': 31, u'numberLast4': u'0833', u'type': u'VISA', u'id': 243043, u'numberFirst6': u'405413'}], u'attributes': {}, u'id': 5247839, u'createdAt': u'2017-01-04T22:20:40Z', u'insights': {u'totalOrders': 0, u'since': u'2017-01-04T22:20:40Z', u'scores': [{u'score': 3.09, u'type': u'OVERALL'}]}}
Get By Id
Get customer by id.
Arguments
If-Modified-Since
header- string (optional)
businessId
path- string (required)
customerId
path- integer (required)
Response
Returns a Customer.
Merchants
Businesses
Business resource represents the merchant business. The Poynt system assumes the following business hierarchy. There is the parent business at the root. Each business could have 0 or more stores. Each store could have 0 or more terminals. This resource provides operations to create, update and view this entire hierarchy.
Definition
GET /businesses
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getBusinessByDeviceId = function getBusinessByDeviceId(options, next) { ... }
/**
* Gets a business by device ID.
* @param {String} options.deviceId
* @return {Business} business
*/
Sample Request
poynt.getBusinessByDeviceId({
deviceId: 'urn:tid:48c54303-6d51-39af-bdeb-4af53f621652'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"acquirer": "ELAVON",
"activeSince": "1970-01-01T00:00:00Z",
"address": {
"city": "Palo Alto",
"countryCode": "USA",
"createdAt": "2017-01-04T22:04:33Z",
"id": 48119,
"line1": "4151 Middlefield Road",
"line2": "Level 2",
"postalCode": "94303",
"status": "ADDED",
"territory": "California",
"territoryType": "STATE",
"type": "BUSINESS",
"updatedAt": "2017-08-25T01:05:33Z"
},
"attributes": { ... },
"businessUrl": "http://lawrence-s-last-straw.com",
"createdAt": "2017-01-04T22:04:34Z",
"description": "Just another test merchant",
"doingBusinessAs": "Lawrence's Last Straw",
"emailAddress": "lawrence-s-last-straw@gmail.com",
"externalMerchantId": "lawrence's0226",
"id": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"industryType": "Restaurant",
"legalName": "Lawrence's Last Straw",
"mcc": "5812",
"mockProcessor": false,
"phone": {
"areaCode": "575",
"createdAt": "2017-01-04T22:04:33Z",
"id": 50700,
"ituCountryCode": "1",
"localPhoneNumber": "2040375",
"status": "ADDED",
"type": "BUSINESS",
"updatedAt": "2017-08-25T01:05:33Z"
},
"processor": "ELAVON",
"sic": "5812",
"status": "ACTIVATED",
"stores": [
{
"acquirer": "ELAVON",
"address": {
"city": "Palo Alto",
"countryCode": "USA",
"createdAt": "2017-01-04T22:04:33Z",
"id": 48120,
"line1": "10617 Business Drive",
"line2": "Suite 424",
"postalCode": "94301",
"status": "ADDED",
"territory": "California",
"territoryType": "STATE",
"type": "BUSINESS",
"updatedAt": "2017-08-16T02:59:42Z"
},
"attributes": { ... },
"currency": "USD",
"displayName": "Lawrence's Last Straw 488",
"externalStoreId": "161779901711",
"fixedLocation": true,
"id": "c394627f-4f68-47fb-90a5-684ea801a352",
"latitude": 37.4457,
"longitude": -122.162,
"mockProcessor": false,
"phone": {
"areaCode": "575",
"createdAt": "2017-01-04T22:04:33Z",
"id": 50701,
"ituCountryCode": "1",
"localPhoneNumber": "2040375",
"status": "ADDED",
"type": "BUSINESS",
"updatedAt": "2017-08-16T02:59:42Z"
},
"processor": "ELAVON",
"processorData": {},
"status": "ACTIVE",
"storeDevices": [
{
"businessAgreements": {
"EULA": {
"acceptedAt": "2017-07-25T01:36:14Z",
"current": true,
"type": "EULA",
"userId": 5247838,
"version": "1f",
"versionOutdated": false
}
},
"catalogId": "9deca670-8761-4133-b1a9-b05b9fb01cb6",
"createdAt": "2017-01-04T22:10:00Z",
"deviceId": "urn:tid:48c54303-6d51-39af-bdeb-4af53f621652",
"externalTerminalId": "8024696638530",
"name": "LAWRENCE'S LAST STRAW DON'T MESS",
"publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyl+Sa2C1E6xcv9d9Mm9N\ngtzDtSsjWd9k7PZPDLy3JRq3dhGU9rQtopfEUrtqRUDRS7xpP3842enns39Z427+\nwOuAq7aqVLHzCIio8+D0m21mmsKpE8rSH54dCKciSypuj/MF4o+jIMA43+ov6dba\nN/6WFH/+c4MzTqz673XldP9RAvrK8k55lKoZW5bvX5Bx0xmFbtey17Uyby+y6kT+\nTyQArYwzEFBA2RQ+LKf/XwIgoh6RcdMVlNahe5LNW2rl5FQGm+HxnvYG6ZQGQ4oX\nFEGClsvOQabdjVXNNA6rVmJeeKmSekVNFjA3ZqEcmq8E6ijmT/H1upmiZ5fI0Eag\nSwIDAQAB\n-----END PUBLIC KEY-----\n",
"serialNumber": "P61SWA231FS000416",
"status": "ACTIVATED",
"storeId": "c394627f-4f68-47fb-90a5-684ea801a352",
"type": "TERMINAL",
"updatedAt": "2017-08-16T04:26:19Z"
}
],
"timezone": "America/Los_Angeles"
}
],
"timezone": "America/Los_Angeles",
"type": "TEST_MERCHANT",
"updatedAt": "2017-08-25T01:05:33Z"
}
Definition
@classmethod
def get_business_by_device_id(cls, device_id):
"""
Get a business by a device id.
Arguments:
device_id (str): the device ID to get a business for
"""
Sample Request
doc, status_code = poynt.Business.get_business_by_device_id(
'urn:tid:48c54303-6d51-39af-bdeb-4af53f621652'
)
if status_code < 300:
print(doc)
Sample Response
{u'stores': [{u'status': u'ACTIVE', u'processorData': {}, u'externalStoreId': u'161779901711', u'displayName': u"Lawrence's Last Straw 488", u'currency': u'USD', u'mockProcessor': False, u'longitude': -122.162, u'id': u'c394627f-4f68-47fb-90a5-684ea801a352', u'storeDevices': [{u'status': u'ACTIVATED', u'storeId': u'c394627f-4f68-47fb-90a5-684ea801a352', u'name': u"LAWRENCE'S LAST STRAW DON'T MESS", u'serialNumber': u'P61SWA231FS000416', u'businessAgreements': {u'EULA': {u'userId': 5247838, u'versionOutdated': False, u'current': True, u'version': u'1f', u'acceptedAt': u'2017-07-25T01:36:14Z', u'type': u'EULA'}}, u'externalTerminalId': u'8024696638530', u'publicKey': u'-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyl+Sa2C1E6xcv9d9Mm9N\ngtzDtSsjWd9k7PZPDLy3JRq3dhGU9rQtopfEUrtqRUDRS7xpP3842enns39Z427+\nwOuAq7aqVLHzCIio8+D0m21mmsKpE8rSH54dCKciSypuj/MF4o+jIMA43+ov6dba\nN/6WFH/+c4MzTqz673XldP9RAvrK8k55lKoZW5bvX5Bx0xmFbtey17Uyby+y6kT+\nTyQArYwzEFBA2RQ+LKf/XwIgoh6RcdMVlNahe5LNW2rl5FQGm+HxnvYG6ZQGQ4oX\nFEGClsvOQabdjVXNNA6rVmJeeKmSekVNFjA3ZqEcmq8E6ijmT/H1upmiZ5fI0Eag\nSwIDAQAB\n-----END PUBLIC KEY-----\n', u'deviceId': u'urn:tid:48c54303-6d51-39af-bdeb-4af53f621652', u'updatedAt': u'2017-08-16T04:26:19Z', u'catalogId': u'9deca670-8761-4133-b1a9-b05b9fb01cb6', u'type': u'TERMINAL', u'createdAt': u'2017-01-04T22:10:00Z'}], u'phone': {u'status': u'ADDED', u'areaCode': u'575', u'localPhoneNumber': u'2040375', u'updatedAt': u'2017-08-16T02:59:42Z', u'ituCountryCode': u'1', u'type': u'BUSINESS', u'id': 50701, u'createdAt': u'2017-01-04T22:04:33Z'}, u'timezone': u'America/Los_Angeles', u'acquirer': u'ELAVON', u'address': {u'status': u'ADDED', u'city': u'Palo Alto', u'countryCode': u'USA', u'line2': u'Suite 424', u'line1': u'10617 Business Drive', u'territoryType': u'STATE', u'updatedAt': u'2017-08-16T02:59:42Z', u'postalCode': u'94301', u'territory': u'California', u'type': u'BUSINESS', u'id': 48120, u'createdAt': u'2017-01-04T22:04:33Z'}, u'latitude': 37.4457, u'attributes': {}, u'processor': u'ELAVON', u'fixedLocation': True}], u'businessUrl': u'http://lawrence-s-last-straw.com', u'updatedAt': u'2017-08-25T01:05:33Z', u'timezone': u'America/Los_Angeles', u'id': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'industryType': u'Restaurant', u'sic': u'5812', u'acquirer': u'ELAVON', u'type': u'TEST_MERCHANT', u'status': u'ACTIVATED', u'description': u'Just another test merchant', u'mockProcessor': False, u'mcc': u'5812', u'activeSince': u'1970-01-01T00:00:00Z', u'phone': {u'status': u'ADDED', u'areaCode': u'575', u'localPhoneNumber': u'2040375', u'updatedAt': u'2017-08-25T01:05:33Z', u'ituCountryCode': u'1', u'type': u'BUSINESS', u'id': 50700, u'createdAt': u'2017-01-04T22:04:33Z'}, u'emailAddress': u'lawrence-s-last-straw@gmail.com', u'address': {u'status': u'ADDED', u'city': u'Palo Alto', u'countryCode': u'USA', u'line2': u'Level 2', u'line1': u'4151 Middlefield Road', u'territoryType': u'STATE', u'updatedAt': u'2017-08-25T01:05:33Z', u'postalCode': u'94303', u'territory': u'California', u'type': u'BUSINESS', u'id': 48119, u'createdAt': u'2017-01-04T22:04:33Z'}, u'externalMerchantId': u"lawrence's0226", u'doingBusinessAs': u"Lawrence's Last Straw", u'createdAt': u'2017-01-04T22:04:34Z', u'legalName': u"Lawrence's Last Straw", u'attributes': {}, u'processor': u'ELAVON'}
Get by device Id
Get a business by a device id.
Arguments
storeDeviceId
query- string (required)
Response
Returns a Business.
Definition
GET /businesses/{businessId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getBusiness = function getBusiness(options, next) { ... }
/**
* Gets a business by ID.
* @param {String} options.businessId
* @return {Business} business
*/
Sample Request
poynt.getBusiness({
businessId: '18f071cc-5ed4-4b33-80c1-305056d42bfb'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"acquirer": "ELAVON",
"activeSince": "1970-01-01T00:00:00Z",
"address": {
"city": "Palo Alto",
"countryCode": "USA",
"createdAt": "2017-01-04T22:04:33Z",
"id": 48119,
"line1": "4151 Middlefield Road",
"line2": "Level 2",
"postalCode": "94303",
"status": "ADDED",
"territory": "California",
"territoryType": "STATE",
"type": "BUSINESS",
"updatedAt": "2017-08-25T01:05:33Z"
},
"attributes": { ... },
"businessUrl": "http://lawrence-s-last-straw.com",
"createdAt": "2017-01-04T22:04:34Z",
"description": "Just another test merchant",
"doingBusinessAs": "Lawrence's Last Straw",
"emailAddress": "lawrence-s-last-straw@gmail.com",
"externalMerchantId": "lawrence's0226",
"id": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"industryType": "Restaurant",
"legalName": "Lawrence's Last Straw",
"mcc": "5812",
"mockProcessor": false,
"phone": {
"areaCode": "575",
"createdAt": "2017-01-04T22:04:33Z",
"id": 50700,
"ituCountryCode": "1",
"localPhoneNumber": "2040375",
"status": "ADDED",
"type": "BUSINESS",
"updatedAt": "2017-08-25T01:05:33Z"
},
"processor": "ELAVON",
"sic": "5812",
"status": "ACTIVATED",
"stores": [
{
"acquirer": "ELAVON",
"address": {
"city": "Palo Alto",
"countryCode": "USA",
"createdAt": "2017-01-04T22:04:33Z",
"id": 48120,
"line1": "10617 Business Drive",
"line2": "Suite 424",
"postalCode": "94301",
"status": "ADDED",
"territory": "California",
"territoryType": "STATE",
"type": "BUSINESS",
"updatedAt": "2017-08-16T02:59:42Z"
},
"attributes": { ... },
"currency": "USD",
"displayName": "Lawrence's Last Straw 488",
"externalStoreId": "161779901711",
"fixedLocation": true,
"id": "c394627f-4f68-47fb-90a5-684ea801a352",
"latitude": 37.4457,
"longitude": -122.162,
"mockProcessor": false,
"phone": {
"areaCode": "575",
"createdAt": "2017-01-04T22:04:33Z",
"id": 50701,
"ituCountryCode": "1",
"localPhoneNumber": "2040375",
"status": "ADDED",
"type": "BUSINESS",
"updatedAt": "2017-08-16T02:59:42Z"
},
"processor": "ELAVON",
"processorData": {},
"status": "ACTIVE",
"storeDevices": [
{
"businessAgreements": {
"EULA": {
"acceptedAt": "2017-07-25T01:36:14Z",
"current": true,
"type": "EULA",
"userId": 5247838,
"version": "1f",
"versionOutdated": false
}
},
"catalogId": "9deca670-8761-4133-b1a9-b05b9fb01cb6",
"createdAt": "2017-01-04T22:10:00Z",
"deviceId": "urn:tid:48c54303-6d51-39af-bdeb-4af53f621652",
"externalTerminalId": "8024696638530",
"name": "LAWRENCE'S LAST STRAW DON'T MESS",
"publicKey": "-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyl+Sa2C1E6xcv9d9Mm9N\ngtzDtSsjWd9k7PZPDLy3JRq3dhGU9rQtopfEUrtqRUDRS7xpP3842enns39Z427+\nwOuAq7aqVLHzCIio8+D0m21mmsKpE8rSH54dCKciSypuj/MF4o+jIMA43+ov6dba\nN/6WFH/+c4MzTqz673XldP9RAvrK8k55lKoZW5bvX5Bx0xmFbtey17Uyby+y6kT+\nTyQArYwzEFBA2RQ+LKf/XwIgoh6RcdMVlNahe5LNW2rl5FQGm+HxnvYG6ZQGQ4oX\nFEGClsvOQabdjVXNNA6rVmJeeKmSekVNFjA3ZqEcmq8E6ijmT/H1upmiZ5fI0Eag\nSwIDAQAB\n-----END PUBLIC KEY-----\n",
"serialNumber": "P61SWA231FS000416",
"status": "ACTIVATED",
"storeId": "c394627f-4f68-47fb-90a5-684ea801a352",
"type": "TERMINAL",
"updatedAt": "2017-08-16T04:26:19Z"
}
],
"timezone": "America/Los_Angeles"
}
],
"timezone": "America/Los_Angeles",
"type": "TEST_MERCHANT",
"updatedAt": "2017-08-25T01:05:33Z"
}
Definition
@classmethod
def get_business(cls, business_id):
"""
Gets a business by ID.
Arguments:
business_id (str): the business ID to get
"""
Sample Request
doc, status_code = poynt.Business.get_business(
'18f071cc-5ed4-4b33-80c1-305056d42bfb'
)
if status_code < 300:
print(doc)
Sample Response
{u'stores': [{u'status': u'ACTIVE', u'processorData': {}, u'externalStoreId': u'161779901711', u'displayName': u"Lawrence's Last Straw 488", u'currency': u'USD', u'mockProcessor': False, u'longitude': -122.162, u'id': u'c394627f-4f68-47fb-90a5-684ea801a352', u'storeDevices': [{u'status': u'ACTIVATED', u'storeId': u'c394627f-4f68-47fb-90a5-684ea801a352', u'name': u"LAWRENCE'S LAST STRAW DON'T MESS", u'serialNumber': u'P61SWA231FS000416', u'businessAgreements': {u'EULA': {u'userId': 5247838, u'versionOutdated': False, u'current': True, u'version': u'1f', u'acceptedAt': u'2017-07-25T01:36:14Z', u'type': u'EULA'}}, u'externalTerminalId': u'8024696638530', u'publicKey': u'-----BEGIN PUBLIC KEY-----\nMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAyl+Sa2C1E6xcv9d9Mm9N\ngtzDtSsjWd9k7PZPDLy3JRq3dhGU9rQtopfEUrtqRUDRS7xpP3842enns39Z427+\nwOuAq7aqVLHzCIio8+D0m21mmsKpE8rSH54dCKciSypuj/MF4o+jIMA43+ov6dba\nN/6WFH/+c4MzTqz673XldP9RAvrK8k55lKoZW5bvX5Bx0xmFbtey17Uyby+y6kT+\nTyQArYwzEFBA2RQ+LKf/XwIgoh6RcdMVlNahe5LNW2rl5FQGm+HxnvYG6ZQGQ4oX\nFEGClsvOQabdjVXNNA6rVmJeeKmSekVNFjA3ZqEcmq8E6ijmT/H1upmiZ5fI0Eag\nSwIDAQAB\n-----END PUBLIC KEY-----\n', u'deviceId': u'urn:tid:48c54303-6d51-39af-bdeb-4af53f621652', u'updatedAt': u'2017-08-16T04:26:19Z', u'catalogId': u'9deca670-8761-4133-b1a9-b05b9fb01cb6', u'type': u'TERMINAL', u'createdAt': u'2017-01-04T22:10:00Z'}], u'phone': {u'status': u'ADDED', u'areaCode': u'575', u'localPhoneNumber': u'2040375', u'updatedAt': u'2017-08-16T02:59:42Z', u'ituCountryCode': u'1', u'type': u'BUSINESS', u'id': 50701, u'createdAt': u'2017-01-04T22:04:33Z'}, u'timezone': u'America/Los_Angeles', u'acquirer': u'ELAVON', u'address': {u'status': u'ADDED', u'city': u'Palo Alto', u'countryCode': u'USA', u'line2': u'Suite 424', u'line1': u'10617 Business Drive', u'territoryType': u'STATE', u'updatedAt': u'2017-08-16T02:59:42Z', u'postalCode': u'94301', u'territory': u'California', u'type': u'BUSINESS', u'id': 48120, u'createdAt': u'2017-01-04T22:04:33Z'}, u'latitude': 37.4457, u'attributes': {}, u'processor': u'ELAVON', u'fixedLocation': True}], u'businessUrl': u'http://lawrence-s-last-straw.com', u'updatedAt': u'2017-08-25T01:05:33Z', u'timezone': u'America/Los_Angeles', u'id': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'industryType': u'Restaurant', u'sic': u'5812', u'acquirer': u'ELAVON', u'type': u'TEST_MERCHANT', u'status': u'ACTIVATED', u'description': u'Just another test merchant', u'mockProcessor': False, u'mcc': u'5812', u'activeSince': u'1970-01-01T00:00:00Z', u'phone': {u'status': u'ADDED', u'areaCode': u'575', u'localPhoneNumber': u'2040375', u'updatedAt': u'2017-08-25T01:05:33Z', u'ituCountryCode': u'1', u'type': u'BUSINESS', u'id': 50700, u'createdAt': u'2017-01-04T22:04:33Z'}, u'emailAddress': u'lawrence-s-last-straw@gmail.com', u'address': {u'status': u'ADDED', u'city': u'Palo Alto', u'countryCode': u'USA', u'line2': u'Level 2', u'line1': u'4151 Middlefield Road', u'territoryType': u'STATE', u'updatedAt': u'2017-08-25T01:05:33Z', u'postalCode': u'94303', u'territory': u'California', u'type': u'BUSINESS', u'id': 48119, u'createdAt': u'2017-01-04T22:04:33Z'}, u'externalMerchantId': u"lawrence's0226", u'doingBusinessAs': u"Lawrence's Last Straw", u'createdAt': u'2017-01-04T22:04:34Z', u'legalName': u"Lawrence's Last Straw", u'attributes': {}, u'processor': u'ELAVON'}
Get by businessId
Get a business by id.
Arguments
businessId
path- string (required)
includeField
query- Set (optional)
Response
Returns a Business.
Business Users
Operations for owners and employees of a business
Definition
GET /businesses/{businessId}/businessUsers
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getBusinessUsers = function getBusinessUsers(options, next) { ... }
/**
* Get all users at a business.
* @param {String} options.businessId
* @return {BusinessUser[]} businessusers
*/
Sample Request
poynt.getBusinessUsers({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
[
{
"status": "EMPLOYED",
"employmentDetails": {
"role": "OWNER",
"startAt": 1483568424,
"endAt": 0
},
"credentials": [
{
"publicCredentialType": "USERNAME",
"id": 33250,
"publicCredentialValue": "law"
}
],
"userId": 5247838,
"firstName": "law",
"lastName": "",
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb"
},
{
"status": "EMPLOYED",
"employmentDetails": {
"role": "EMPLOYEE",
"startAt": 0,
"endAt": 0
},
"credentials": [
{
"publicCredentialType": "USERNAME",
"id": 33266,
"publicCredentialValue": "sample"
}
],
"userId": 5247869,
"firstName": "Sample",
"lastName": "Person",
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb"
},
{
"status": "EMPLOYED",
"employmentDetails": {
"role": "EMPLOYEE",
"startAt": 0,
"endAt": 0
},
"credentials": [
{
"publicCredentialType": "USERNAME",
"id": 33267,
"publicCredentialValue": "Test"
}
],
"userId": 5247870,
"firstName": "Test",
"lastName": "Person",
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb"
},
{
"status": "EMPLOYED",
"employmentDetails": {
"role": "OWNER",
"startAt": 1487789772,
"endAt": 0
},
"credentials": [
{
"publicCredentialType": "USERNAME",
"id": 35355,
"publicCredentialValue": "yan"
}
],
"userId": 5253478,
"firstName": "yan",
"lastName": "",
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb"
}
]
Definition
@classmethod
def get_business_users(cls, business_id):
"""
Get all users at a business.
Arguments:
business_id (str): the business ID
"""
Sample Request
doc, status_code = poynt.BusinessUser.get_business_users(
'18f071cc-5ed4-4b33-80c1-305056d42bfb'
)
if status_code < 300:
print(doc)
Sample Response
[{u'status': u'EMPLOYED', u'firstName': u'law', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'lastName': u'', u'userId': 5247838, u'employmentDetails': {u'startAt': 1483568424, u'role': u'OWNER', u'endAt': 0}, u'credentials': [{u'publicCredentialType': u'USERNAME', u'publicCredentialValue': u'law', u'id': 33250}]}, {u'status': u'EMPLOYED', u'firstName': u'Sample', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'lastName': u'Person', u'userId': 5247869, u'employmentDetails': {u'startAt': 0, u'role': u'EMPLOYEE', u'endAt': 0}, u'credentials': [{u'publicCredentialType': u'USERNAME', u'publicCredentialValue': u'sample', u'id': 33266}]}, {u'status': u'EMPLOYED', u'firstName': u'Test', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'lastName': u'Person', u'userId': 5247870, u'employmentDetails': {u'startAt': 0, u'role': u'EMPLOYEE', u'endAt': 0}, u'credentials': [{u'publicCredentialType': u'USERNAME', u'publicCredentialValue': u'Test', u'id': 33267}]}, {u'status': u'EMPLOYED', u'firstName': u'yan', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'lastName': u'', u'userId': 5253478, u'employmentDetails': {u'startAt': 1487789772, u'role': u'OWNER', u'endAt': 0}, u'credentials': [{u'publicCredentialType': u'USERNAME', u'publicCredentialValue': u'yan', u'id': 35355}]}]
Get All Users
Get all users at a business.
Arguments
businessId
path- string (required)
Response
Returns a array.
Definition
GET /businesses/{businessId}/businessUsers/{businessUserId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getBusinessUser = function getBusinessUser(options, next) { ... }
/**
* Get a single user at a business.
* @param {String} options.businessId
* @param {String} options.businessUserId
* @return {BusinessUser} businessuser
*/
Sample Request
poynt.getBusinessUser({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
businessUserId : 5247838
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"credentials": [
{
"id": 33250,
"publicCredentialType": "USERNAME",
"publicCredentialValue": "law"
}
],
"employmentDetails": {
"endAt": 0,
"role": "OWNER",
"startAt": 1483568424
},
"firstName": "law",
"lastName": "",
"status": "EMPLOYED",
"userId": 5247838
}
Definition
@classmethod
def get_business_user(cls, business_id, business_user_id):
"""
Get a single user at a business.
Arguments:
business_id (str): the business ID
business_user_id (str): the user ID
"""
Sample Request
doc, status_code = poynt.BusinessUser.get_business_user(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
5247838
)
if status_code < 300:
print(doc)
Sample Response
{u'status': u'EMPLOYED', u'firstName': u'law', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'lastName': u'', u'userId': 5247838, u'employmentDetails': {u'startAt': 1483568424, u'role': u'OWNER', u'endAt': 0}, u'credentials': [{u'publicCredentialType': u'USERNAME', u'publicCredentialValue': u'law', u'id': 33250}]}
Get User
Get a user at a business.
Arguments
businessId
path- string (required)
businessUserId
path- integer (required)
Response
Returns a BusinessUser.
Products
Products are what a merchant sell at their business. Products have a name
, shortCode
, sku
, and price
. sku
should be unique for tracking inventory purpose. shortCode
should be unique and represents an easily remembered identifier for the business user.
Definition
GET /businesses/{businessId}/products
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getProducts = function getProducts(options, next) { ... }
/**
* Get a list of products
* @param {String} options.businessId
* @param {String} options.startAt (optional)
* @param {Integer} options.startOffset (optional)
* @param {String} options.endAt (optional)
* @param {Integer} options.limit (optional)
* @return {ProductList} products
*/
Sample Request
poynt.getProducts({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
startOffset : 0,
limit : 1
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"links": [
{
"href": "/businesses/18f071cc-5ed4-4b33-80c1-305056d42bfb/products?startAt=2017-01-04T22%3A04%3A34Z&endAt=2017-08-28T07%3A23%3A30Z&startOffset=1&limit=1",
"method": "GET",
"rel": "next"
}
],
"products": [
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-01-04T22:04:34Z",
"description": "Cappuccino",
"id": "080aae58-93fe-4754-93f4-8fbf9420b49d",
"name": "Cappuccino",
"price": {
"amount": 350,
"currency": "USD"
},
"shortCode": "Cappu",
"sku": "082011500008",
"status": "ACTIVE",
"type": "SIMPLE",
"updatedAt": "2017-01-04T22:04:34Z"
}
]
}
Definition
@classmethod
def get_products(cls, business_id, start_at=None, start_offset=None,
end_at=None, limit=None):
"""
Get a list of products at a business.
Arguments:
business_id (str): the business ID
Keyword arguments:
start_at (int, optional): get products created after this time in seconds
start_offset (int, optional): the numeric offset to start the list (for pagination)
end_at (int, optional): get products created before this time in seconds
limit (int, optional): how many products to return (for pagination)
"""
Sample Request
doc, status_code = poynt.Product.get_products(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
start_offset=0,
limit=1
)
if status_code < 300:
print(doc)
Sample Response
{u'products': [{u'status': u'ACTIVE', u'sku': u'082011500008', u'name': u'Cappuccino', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'type': u'SIMPLE', u'price': {u'currency': u'USD', u'amount': 350}, u'updatedAt': u'2017-01-04T22:04:34Z', u'shortCode': u'Cappu', u'id': u'080aae58-93fe-4754-93f4-8fbf9420b49d', u'createdAt': u'2017-01-04T22:04:34Z', u'description': u'Cappuccino'}], u'links': [{u'href': u'/businesses/18f071cc-5ed4-4b33-80c1-305056d42bfb/products?startAt=2017-01-04T22%3A04%3A34Z&endAt=2017-08-28T07%3A24%3A08Z&startOffset=1&limit=1', u'method': u'GET', u'rel': u'next'}]}
Get List
Get all product since time. Result is paginated
Arguments
If-Modified-Since
header- string (optional)
startAt
query- string (optional)
startOffset
query- integer (optional)
endAt
query- string (optional)
limit
query- integer (optional)
businessId
path- string (required)
Response
Returns a ProductList.
Definition
POST /businesses/{businessId}/products
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.createProduct = function createProduct(options, product, next) { ... }
/**
* Creates a product on a business.
* @param {String} options.businessId
* @param {Product} product
* @return {Product} product
*/
Sample Request
poynt.createProduct({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb'
}, {
price: {
currency: 'USD',
amount: 500
},
status: 'ACTIVE',
shortCode: 'FOO',
sku: 'FOO',
name: 'Foo Product'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-08-28T07:26:29Z",
"id": "e989e7eb-5c59-4c4d-9a80-006147f0740f",
"name": "Foo Product",
"price": {
"amount": 500,
"currency": "USD"
},
"shortCode": "FOO",
"sku": "FOO",
"status": "ACTIVE",
"type": "SIMPLE",
"updatedAt": "2017-08-28T07:26:29Z"
}
Definition
@classmethod
def create_product(cls, business_id, product):
"""
Creates a product on a business.
Arguments:
business_id (str): the business ID
product (dict): the full product object
"""
Sample Request
doc, status_code = poynt.Product.create_product(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
{
'price': {
'currency': 'USD',
'amount': 500
},
'status': 'ACTIVE',
'shortCode': 'FOO',
'sku': 'FOO',
'name': 'Foo Product'
}
)
if status_code < 300:
print(doc)
Sample Response
{u'status': u'ACTIVE', u'sku': u'FOO', u'name': u'Foo Product', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'type': u'SIMPLE', u'price': {u'currency': u'USD', u'amount': 500}, u'updatedAt': u'2017-08-28T07:25:23Z', u'shortCode': u'FOO', u'id': u'd92cc4d6-0298-47cf-9537-b45b1870454c', u'createdAt': u'2017-08-28T07:25:23Z'}
Create
Create a product definition for a business.
Arguments
businessId
path- string (required)
product
body- Product (optional)
Response
Returns a Product.
Definition
GET /businesses/{businessId}/products/lookup
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.lookupProducts = function lookupProducts(options, next) { ... }
/**
* Get a list of products by ID.
* @param {String} options.businessId
* @param {String[]} options.ids
* @return {ProductList} products
*/
Sample Request
poynt.lookupProducts({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
ids : ['e989e7eb-5c59-4c4d-9a80-006147f0740f']
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
[
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-08-28T07:26:29Z",
"id": "e989e7eb-5c59-4c4d-9a80-006147f0740f",
"name": "Foo Product",
"price": {
"amount": 500,
"currency": "USD"
},
"shortCode": "FOO",
"sku": "FOO",
"status": "ACTIVE",
"type": "SIMPLE",
"updatedAt": "2017-08-28T07:26:29Z"
}
]
Definition
@classmethod
def lookup_products(cls, business_id, product_ids):
"""
Get a list of products by ID.
Arguments:
business_id (str): the business ID
product_ids (list of str): a list of product ids
"""
Sample Request
doc, status_code = poynt.Product.lookup_products(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
['e989e7eb-5c59-4c4d-9a80-006147f0740f']
)
if status_code < 300:
print(doc)
Sample Response
{u'products': [{u'status': u'ACTIVE', u'sku': u'FOO', u'name': u'Foo Product', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'type': u'SIMPLE', u'price': {u'currency': u'USD', u'amount': 500}, u'updatedAt': u'2017-08-28T07:26:29Z', u'shortCode': u'FOO', u'id': u'e989e7eb-5c59-4c4d-9a80-006147f0740f', u'createdAt': u'2017-08-28T07:26:29Z'}]}
Get Multiple Id
Get multiple products by ids.
Arguments
businessId
path- string (required)
ids
query- string (required)
Response
Returns a ProductList.
Definition
GET /businesses/{businessId}/products/summary
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getProductsSummary = function getProductsSummary(options, next) { ... }
/**
* Get a list of summaries at a business. Product summaries contain product
* shortCode, price, businessId, name, and id.
* @param {String} options.businessId
* @param {String} options.startAt (optional)
* @param {Integer} options.startOffset (optional)
* @param {String} options.endAt (optional)
* @param {Integer} options.limit (optional)
* @return {ProductList} products
*/
Sample Request
poynt.getProductsSummary({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
startOffset : 0,
limit : 1
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"links": [
{
"href": "/businesses/18f071cc-5ed4-4b33-80c1-305056d42bfb/products/summary?startAt=2017-01-04T22%3A04%3A34Z&endAt=2017-08-28T07%3A30%3A34Z&startOffset=1&limit=1",
"method": "GET",
"rel": "next"
}
],
"products": [
{
"id": "080aae58-93fe-4754-93f4-8fbf9420b49d",
"name": "Cappuccino",
"price": {
"amount": 350,
"currency": "USD"
},
"shortCode": "Cappu"
}
]
}
Definition
@classmethod
def get_products_summary(cls, business_id, start_at=None, start_offset=None,
end_at=None, limit=None):
"""
Get a list of product summaries at a business. Product summaries contain
product shortCode, price, businessId, name, and id.
Arguments:
business_id (str): the business ID
Keyword arguments:
start_at (int, optional): get products created after this time in seconds
start_offset (int, optional): the numeric offset to start the list (for pagination)
end_at (int, optional): get products created before this time in seconds
limit (int, optional): how many products to return (for pagination)
"""
Sample Request
doc, status_code = poynt.Product.get_products_summary(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
start_offset=0,
limit=1
)
if status_code < 300:
print(doc)
Sample Response
{u'products': [{u'price': {u'currency': u'USD', u'amount': 350}, u'shortCode': u'Cappu', u'id': u'080aae58-93fe-4754-93f4-8fbf9420b49d', u'name': u'Cappuccino'}], u'links': [{u'href': u'/businesses/18f071cc-5ed4-4b33-80c1-305056d42bfb/products/summary?startAt=2017-01-04T22%3A04%3A34Z&endAt=2017-08-28T07%3A30%3A01Z&startOffset=1&limit=1', u'method': u'GET', u'rel': u'next'}]}
Get Summary
Get all product summary. Result is paginated
Arguments
If-Modified-Since
header- string (optional)
startAt
query- string (optional)
startOffset
query- integer (optional)
endAt
query- string (optional)
limit
query- integer (optional)
businessId
path- string (required)
Response
Returns a ProductSummaryList.
Definition
DELETE /businesses/{businessId}/products/{productId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.deleteProduct = function deleteProduct(options, next) { ... }
/**
* Deactivates a product. Deactivated products will be removed from all catalog
* references.
* @param {String} options.businessId
* @param {String} options.productId
* @return {Product} product
*/
Sample Request
poynt.deleteProduct({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
productId : '080aae58-93fe-4754-93f4-8fbf9420b49d'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{}
Definition
@classmethod
def delete_product(cls, business_id, product_id):
"""
Deactivates a product. Deactivated products will be removed from all
catalog references.
Arguments:
business_id (str): the business ID
product_id (str): the product ID
"""
Sample Request
doc, status_code = poynt.Product.delete_product(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'080aae58-93fe-4754-93f4-8fbf9420b49d'
)
if status_code < 300:
print(doc)
Sample Response
None
Deactivate
Deactivate a product. Deactivated product will be removed from all catalog references.
Arguments
businessId
path- string (required)
productId
path- string (required)
Definition
GET /businesses/{businessId}/products/{productId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getProduct = function getProduct(options, next) { ... }
/**
* Get a single product for a business.
* @param {String} options.businessId
* @param {String} options.productId
* @return {Product} product
*/
Sample Request
poynt.getProduct({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
productId : '0cb54922-0ef2-4509-8735-72ccb373c464'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-01-04T22:04:34Z",
"description": "Apple Pie",
"id": "0cb54922-0ef2-4509-8735-72ccb373c464",
"name": "Apple Pie",
"price": {
"amount": 300,
"currency": "USD"
},
"shortCode": "ApPie",
"sku": "082011500001",
"status": "ACTIVE",
"type": "SIMPLE",
"updatedAt": "2017-01-04T22:04:34Z"
}
Definition
@classmethod
def get_product(cls, business_id, product_id):
"""
Get a single product for a business.
Arguments:
business_id (str): the business ID
product_id (str): the product ID
"""
Sample Request
doc, status_code = poynt.Product.get_product(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'0cb54922-0ef2-4509-8735-72ccb373c464'
)
if status_code < 300:
print(doc)
Sample Response
{u'status': u'ACTIVE', u'sku': u'082011500001', u'name': u'Apple Pie', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'type': u'SIMPLE', u'price': {u'currency': u'USD', u'amount': 300}, u'updatedAt': u'2017-01-04T22:04:34Z', u'shortCode': u'ApPie', u'id': u'0cb54922-0ef2-4509-8735-72ccb373c464', u'createdAt': u'2017-01-04T22:04:34Z', u'description': u'Apple Pie'}
Get By Id
Get a business product by id.
Arguments
businessId
path- string (required)
If-Modified-Since
header- string (optional)
productId
path- string (required)
Response
Returns a Product.
Definition
PATCH /businesses/{businessId}/products/{productId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.updateProduct = function updateProduct(options, productOrPatch, next) { ... }
/**
* Updates a product by ID. Can either specify the whole product, or an array
* of JSON Patch instructions.
* @param {String} options.businessId - the business ID
* @param {String} options.productId - the product ID
* @param {Boolean} options.noRemove - don't remove any keys from old product in
* the patch. safer this way. defaults to true
* @param {Object} productOrPatch - if is an array, will treat as JSON patch;
* if object, will treat as product
* @return {Product} product
*/
Sample Request
poynt.updateProduct({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
productId : '0cb54922-0ef2-4509-8735-72ccb373c464'
}, {
price : {
currency : 'USD',
amount : 600
}
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-01-04T22:04:34Z",
"description": "Apple Pie",
"id": "0cb54922-0ef2-4509-8735-72ccb373c464",
"name": "Apple Pie",
"price": {
"amount": 600,
"currency": "USD"
},
"shortCode": "ApPie",
"sku": "082011500001",
"status": "ACTIVE",
"type": "SIMPLE",
"updatedAt": "2017-08-28T07:35:51Z"
}
Definition
@classmethod
def update_product(cls, business_id, product_id, product=None, patch=None, no_remove=True):
"""
Updates a product by ID. Can either specify the whole product, or an array
of JSON Patch instructions.
Arguments:
business_id (str): the business ID
product_id (str): the product ID
Keyword arguments:
product (dict): the full product object
patch (list of dict): JSON Patch update instructions
no_remove (boolean, optional): don't remove any keys from old product in the patch.
safer this way. defaults to True
"""
Sample Request
doc, status_code = poynt.Product.update_product(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'0cb54922-0ef2-4509-8735-72ccb373c464',
product={
'price': {
'currency': 'USD',
'amount': 600
}
}
)
if status_code < 300:
print(doc)
Sample Response
{u'status': u'ACTIVE', u'sku': u'082011500001', u'name': u'Apple Pie', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'type': u'SIMPLE', u'price': {u'currency': u'USD', u'amount': 600}, u'updatedAt': u'2017-08-28T07:36:15Z', u'shortCode': u'ApPie', u'id': u'0cb54922-0ef2-4509-8735-72ccb373c464', u'createdAt': u'2017-01-04T22:04:34Z', u'description': u'Apple Pie'}
Update By Id
Update a product by id.
Arguments
businessId
path- string (required)
productId
path- string (required)
patch
body- JsonPatch (optional)
Response
Returns a Product.
Definition
PUT /businesses/{businessId}/products/{productId}/variants
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
This method is currently not possible using the Node.js SDK.
Definition
This method is currently not possible using the Python SDK.
Upsert variant
Upsert a variant of a product, retaining its inventory, if any.
Arguments
businessId
path- string (required)
productId
path- string (required)
variant
body- Variant (optional)
Response
Returns a Variant.
Definition
GET /businesses/{businessId}/products/{productId}/variants
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
This method is currently not possible using the Node.js SDK.
Definition
This method is currently not possible using the Python SDK.
Get all variants
Get all variants of this product.
Arguments
businessId
path- string (required)
productId
path- string (required)
Response
Returns a array.
Definition
DELETE /businesses/{businessId}/products/{productId}/variants/{sku}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
This method is currently not possible using the Node.js SDK.
Definition
This method is currently not possible using the Python SDK.
Delete variant
Delete a variant of a product
Arguments
businessId
path- string (required)
productId
path- string (required)
sku
path- string (required)
Catalogs
A catalog is a complete list of products for sale by the merchant. Catalog can contain products and/or categories of products organized in a hierarchy. Catalogs, once defined, can be assigned to a store or individual Poynt Terminal.
Definition
GET /businesses/{businessId}/catalogs
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getCatalogs = function getCatalogs(options, next) { ... }
/**
* Get a list of catalogs
* @param {String} options.businessId
* @param {String} options.startAt (optional)
* @param {Integer} options.startOffset (optional)
* @param {String} options.endAt (optional)
* @param {Integer} options.limit (optional)
* @return {CatalogList} catalogs
*/
Sample Request
poynt.getCatalogs({
businessId: '18f071cc-5ed4-4b33-80c1-305056d42bfb'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"catalogs": [
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-08-16T04:25:59Z",
"displayMetadata": [
{
"horizontalScroll": "false",
"numberOfColumns": 4,
"numberOfRows": 6,
"optimizedForPackage": "poynt-smart-terminal",
"verticalScroll": "true"
}
],
"id": "9deca670-8761-4133-b1a9-b05b9fb01cb6",
"name": "Leech Catalog",
"products": [
{
"displayOrder": 1,
"id": "74e9594a-4de0-40dd-a955-af2155dc10e3"
},
{
"displayOrder": 7,
"id": "8b86b625-b209-44cb-8e3e-c6a09af4e88e"
},
{
"displayOrder": 10,
"id": "c8bbc0f0-c7ad-4925-8a5e-1ab8eec22fcb"
},
{
"displayOrder": 11,
"id": "909b0361-79d8-4fd9-a6c7-85391787769e"
},
{
"displayOrder": 12,
"id": "c77ef1c5-9895-4515-9035-209d579a3af3"
},
{
"displayOrder": 13,
"id": "54127174-2b69-4cff-ad2d-5893795a12f2"
},
{
"displayOrder": 14,
"id": "691989f4-e610-4a3f-94b3-3b191fc68d40"
},
{
"displayOrder": 17,
"id": "6c34a14b-8184-4da4-bb5f-c87c78bdce8e"
},
{
"displayOrder": 18,
"id": "f77346e8-172d-43d8-9a62-c18ed9b4f787"
},
{
"displayOrder": 23,
"id": "6eec1971-5eab-4410-b124-27e1356ea6f7"
}
],
"updatedAt": "2017-08-19T02:28:14Z"
},
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-08-28T07:41:48Z",
"id": "3301546f-aa10-404c-8dd2-44894db70f56",
"name": "Foo catalog",
"updatedAt": "2017-08-28T07:41:48Z"
},
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-08-28T07:42:19Z",
"id": "ee85312d-7449-4003-8222-a22415fdfed9",
"name": "Foo catalog",
"updatedAt": "2017-08-28T07:42:19Z"
}
]
}
Definition
@classmethod
def get_catalogs(cls, business_id, start_at=None, start_offset=None,
end_at=None, limit=None):
"""
Get all catalogs at a business.
Arguments:
business_id (str): the business ID
Keyword arguments:
start_at (int, optional): get catalogs created after this time in seconds
start_offset (int, optional): the numeric offset to start the list (for pagination)
end_at (int, optional): get catalogs created before this time in seconds
limit (int, optional): how many catalogs to return (for pagination)
"""
Sample Request
doc, status_code = poynt.Catalog.get_catalogs(
'18f071cc-5ed4-4b33-80c1-305056d42bfb'
)
if status_code < 300:
print(doc)
Sample Response
{u'catalogs': [{u'name': u'Leech Catalog', u'displayMetadata': [{u'verticalScroll': u'true', u'numberOfColumns': 4, u'optimizedForPackage': u'poynt-smart-terminal', u'horizontalScroll': u'false', u'numberOfRows': 6}], u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'products': [{u'id': u'74e9594a-4de0-40dd-a955-af2155dc10e3', u'displayOrder': 1}, {u'id': u'8b86b625-b209-44cb-8e3e-c6a09af4e88e', u'displayOrder': 7}, {u'id': u'c8bbc0f0-c7ad-4925-8a5e-1ab8eec22fcb', u'displayOrder': 10}, {u'id': u'909b0361-79d8-4fd9-a6c7-85391787769e', u'displayOrder': 11}, {u'id': u'c77ef1c5-9895-4515-9035-209d579a3af3', u'displayOrder': 12}, {u'id': u'54127174-2b69-4cff-ad2d-5893795a12f2', u'displayOrder': 13}, {u'id': u'691989f4-e610-4a3f-94b3-3b191fc68d40', u'displayOrder': 14}, {u'id': u'6c34a14b-8184-4da4-bb5f-c87c78bdce8e', u'displayOrder': 17}, {u'id': u'f77346e8-172d-43d8-9a62-c18ed9b4f787', u'displayOrder': 18}, {u'id': u'6eec1971-5eab-4410-b124-27e1356ea6f7', u'displayOrder': 23}], u'updatedAt': u'2017-08-19T02:28:14Z', u'id': u'9deca670-8761-4133-b1a9-b05b9fb01cb6', u'createdAt': u'2017-08-16T04:25:59Z'}, {u'name': u'Foo catalog', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'id': u'3301546f-aa10-404c-8dd2-44894db70f56', u'createdAt': u'2017-08-28T07:41:48Z', u'updatedAt': u'2017-08-28T07:41:48Z'}, {u'name': u'Foo catalog', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'id': u'ee85312d-7449-4003-8222-a22415fdfed9', u'createdAt': u'2017-08-28T07:42:19Z', u'updatedAt': u'2017-08-28T07:42:19Z'}]}
Get List
Get all catalog since time. Result is paginated
Arguments
If-Modified-Since
header- string (optional)
startAt
query- string (optional)
startOffset
query- integer (optional)
endAt
query- string (optional)
limit
query- integer (optional)
businessId
path- string (required)
Response
Returns a CatalogList.
Definition
GET /businesses/{businessId}/catalogs/{catalogId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getCatalog = function getCatalog(options, next) { ... }
/**
* Get a single catalog for a business.
* @param {String} options.businessId
* @param {String} options.catalogId
* @return {Catalog} catalog
*/
Sample Request
poynt.getCatalog({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
catalogId : '365febc2-28b6-411e-85d7-7a57f72ff597'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-08-28T07:47:14Z",
"id": "365febc2-28b6-411e-85d7-7a57f72ff597",
"name": "Foo catalog",
"products": [
{
"displayOrder": 1,
"id": "74c89006-ea3c-4c28-8a13-408b77cbe16c"
}
],
"updatedAt": "2017-08-28T07:47:14Z"
}
Definition
@classmethod
def get_catalog(cls, business_id, catalog_id):
"""
Get a single catalog for a business.
Arguments:
business_id (str): the business ID
catalog_id (str): the catalog ID
"""
Sample Request
doc, status_code = poynt.Catalog.get_catalog(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'365febc2-28b6-411e-85d7-7a57f72ff597'
)
if status_code < 300:
print(doc)
Sample Response
{u'name': u'Foo catalog', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'products': [{u'id': u'74c89006-ea3c-4c28-8a13-408b77cbe16c', u'displayOrder': 1}], u'updatedAt': u'2017-08-28T07:47:14Z', u'id': u'365febc2-28b6-411e-85d7-7a57f72ff597', u'createdAt': u'2017-08-28T07:47:14Z'}
Get By Id
Get a catalog by id.
Arguments
If-Modified-Since
header- string (optional)
businessId
path- string (required)
catalogId
path- string (required)
Response
Returns a Catalog.
Definition
GET /businesses/{businessId}/catalogs/{catalogId}/full
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getFullCatalog = function getFullCatalog(options, next) { ... }
/**
* Get a catalog by id with all product details info embedded in the Catalog.
* @param {String} options.businessId
* @param {String} options.catalogId
* @return {Catalog} catalog
*/
Sample Request
poynt.getFullCatalog({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
catalogId : '365febc2-28b6-411e-85d7-7a57f72ff597'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"categories": [
{
"id": "d2c335c9-a771-469f-a0b3-633977aea290",
"name": "Category 2",
"shortCode": "Cat"
}
],
"createdAt": "2017-08-28T07:47:14Z",
"id": "365febc2-28b6-411e-85d7-7a57f72ff597",
"name": "Foo catalog",
"products": [
{
"displayOrder": 1,
"product": {
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-08-28T07:47:14Z",
"id": "74c89006-ea3c-4c28-8a13-408b77cbe16c",
"name": "Foo 2",
"price": {
"amount": 600,
"currency": "USD"
},
"shortCode": "Foo2",
"sku": "Foo2",
"status": "ACTIVE",
"type": "SIMPLE",
"updatedAt": "2017-08-28T07:47:14Z"
}
}
],
"updatedAt": "2017-08-28T08:08:35Z"
}
Definition
@classmethod
def get_full_catalog(cls, business_id, catalog_id):
"""
Get a catalog by id with all product details info embedded in
the Catalog.
Arguments:
business_id (str): the business ID
catalog_id (str): the catalog ID
"""
Sample Request
doc, status_code = poynt.Catalog.get_full_catalog(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'365febc2-28b6-411e-85d7-7a57f72ff597'
)
if status_code < 300:
print(doc)
Sample Response
{u'name': u'Foo catalog', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'products': [{u'product': {u'status': u'ACTIVE', u'sku': u'Foo2', u'name': u'Foo 2', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'type': u'SIMPLE', u'price': {u'currency': u'USD', u'amount': 600}, u'updatedAt': u'2017-08-28T07:47:14Z', u'shortCode': u'Foo2', u'id': u'74c89006-ea3c-4c28-8a13-408b77cbe16c', u'createdAt': u'2017-08-28T07:47:14Z'}, u'displayOrder': 1}], u'createdAt': u'2017-08-28T07:47:14Z', u'updatedAt': u'2017-08-28T08:08:35Z', u'id': u'365febc2-28b6-411e-85d7-7a57f72ff597', u'categories': [{u'shortCode': u'Cat', u'id': u'd2c335c9-a771-469f-a0b3-633977aea290', u'name': u'Category 2'}]}
Get Full Catalog By Id
Get a catalog by id with all product details info embedded in the Catalog.
Arguments
If-Modified-Since
header- string (optional)
businessId
path- string (required)
catalogId
path- string (required)
Response
Returns a CatalogWithProduct.
Definition
POST /businesses/{businessId}/catalogs
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.createCatalog = function createCatalog(options, catalog, next) { ... }
/**
* Creates a catalog for a business.
* @param {String} options.businessId
* @param {Catalog} catalog
* @return {Catalog} catalog
*/
Sample Request
poynt.createCatalog({
businessId: '18f071cc-5ed4-4b33-80c1-305056d42bfb'
}, {
name: 'Foo catalog'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-08-28T07:42:19Z",
"id": "ee85312d-7449-4003-8222-a22415fdfed9",
"name": "Foo catalog",
"updatedAt": "2017-08-28T07:42:19Z"
}
Definition
@classmethod
def create_catalog(cls, business_id, catalog):
"""
Creates a catalog on a business.
Arguments:
business_id (str): the business ID
catalog (dict): the catalog object
"""
Sample Request
doc, status_code = poynt.Catalog.create_catalog(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
{
'name': 'Foo catalog'
}
)
if status_code < 300:
print(doc)
Sample Response
{u'name': u'Foo catalog', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'id': u'3301546f-aa10-404c-8dd2-44894db70f56', u'createdAt': u'2017-08-28T07:41:48Z', u'updatedAt': u'2017-08-28T07:41:48Z'}
Create
Create a catalog for a business.
Arguments
catalog
body- Catalog (optional)
businessId
path- string (required)
Response
Returns a Catalog.
Definition
POST /businesses/{businessId}/catalogs/full
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.createFullCatalog = function createFullCatalog(options, catalog, next) { ... }
/**
* Creates a catalog for a business. This differs from createCatalog as you can
* create products and catalogs at the same time.
* @param {String} options.businessId
* @param {Catalog} catalog
* @return {Catalog} catalog
*/
Sample Request
poynt.createFullCatalog({
businessId: '18f071cc-5ed4-4b33-80c1-305056d42bfb'
}, {
name: 'Foo catalog',
products: [{
product: {
businessId: '18f071cc-5ed4-4b33-80c1-305056d42bfb',
name: 'Foo 2',
price: {
currency: 'USD',
amount: 600
},
sku: 'Foo2',
shortCode: 'Foo2'
},
displayOrder: 1
}]
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-08-28T07:48:28Z",
"id": "e3e16774-321e-463f-8ed9-8a996094b1d9",
"name": "Foo catalog",
"products": [
{
"displayOrder": 1,
"product": {
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-08-28T07:48:28Z",
"id": "0968d410-cb86-41a1-838c-c9a868ad0335",
"name": "Foo 2",
"price": {
"amount": 600,
"currency": "USD"
},
"shortCode": "Foo2",
"sku": "Foo2",
"status": "ACTIVE",
"type": "SIMPLE",
"updatedAt": "2017-08-28T07:48:28Z"
}
}
],
"updatedAt": "2017-08-28T07:48:28Z"
}
Definition
@classmethod
def create_full_catalog(cls, business_id, full_catalog):
"""
Creates a catalog on a business with embedded products.
This differs from create_catalog as you can create products
and catalogs at the same time.
Arguments:
business_id (str): the business ID
full_catalog (dict): the full catalog object
"""
Sample Request
doc, status_code = poynt.Catalog.create_full_catalog(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
{
'name': 'Foo catalog',
'products': [{
'product': {
'businessId': '18f071cc-5ed4-4b33-80c1-305056d42bfb',
'name': 'Foo 2',
'price': {
'currency': 'USD',
'amount': 600
},
'sku': 'Foo2',
'shortCode': 'Foo2'
},
'displayOrder': 1
}]
}
)
if status_code < 300:
print(doc)
Sample Response
{u'name': u'Foo catalog', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'products': [{u'product': {u'status': u'ACTIVE', u'sku': u'Foo2', u'name': u'Foo 2', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'type': u'SIMPLE', u'price': {u'currency': u'USD', u'amount': 600}, u'updatedAt': u'2017-08-28T07:47:14Z', u'shortCode': u'Foo2', u'id': u'74c89006-ea3c-4c28-8a13-408b77cbe16c', u'createdAt': u'2017-08-28T07:47:14Z'}, u'displayOrder': 1}], u'updatedAt': u'2017-08-28T07:47:14Z', u'id': u'365febc2-28b6-411e-85d7-7a57f72ff597', u'createdAt': u'2017-08-28T07:47:14Z'}
Create Full
Create a catalog with all its embedded products.
Arguments
catalog
body- CatalogWithProduct (optional)
businessId
path- string (required)
Response
Returns a CatalogWithProduct.
Definition
GET /businesses/{businessId}/catalogs/search
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
This method is currently not possible using the Node.js SDK.
Definition
This method is currently not possible using the Python SDK.
Search Catalog
Search for a catalog by name or device id.
Arguments
businessId
path- string (required)
name
query- string (optional)
deviceId
query- string (optional)
Response
Returns a Catalog.
Definition
PATCH /businesses/{businessId}/catalogs/{catalogId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.updateCatalog = function updateCatalog(options, catalogOrPatch, next) { ... }
/**
* Updates a catalog by ID. Can either specify the whole catalog, or an array
* of JSON Patch instructions.
* @param {String} options.businessId - the business ID
* @param {String} options.catalogId - the catalog ID
* @param {Boolean} options.noRemove - don't remove any keys from old catalog in
* the patch. safer this way. defaults to true
* @param {Object} catalogOrPatch - if is an array, will treat as JSON patch;
* if object, will treat as catalog
* @return {Catalog} catalog
*/
Sample Request
poynt.updateCatalog({
businessId: '18f071cc-5ed4-4b33-80c1-305056d42bfb',
catalogId: 'e3e16774-321e-463f-8ed9-8a996094b1d9'
}, {
name: 'New foo catalog'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-08-28T07:48:28Z",
"id": "e3e16774-321e-463f-8ed9-8a996094b1d9",
"name": "New foo catalog",
"products": [
{
"displayOrder": 1,
"id": "0968d410-cb86-41a1-838c-c9a868ad0335"
}
],
"updatedAt": "2017-08-28T07:50:17Z"
}
Definition
@classmethod
def update_catalog(cls, business_id, catalog_id, catalog=None, patch=None, no_remove=True):
"""
Updates a catalog by ID. Can either specify the whole catalog, or an array
of JSON Patch instructions.
Arguments:
business_id (str): the business ID
catalog_id (str): the catalog ID
Keyword arguments:
catalog (dict): the catalog object. this should be a Catalog, not a CatalogWithProduct.
patch (list of dict): JSON Patch update instructions
no_remove (boolean, optional): don't remove any keys from old catalog in the patch.
safer this way. defaults to True
"""
Sample Request
doc, status_code = poynt.Catalog.update_catalog(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'e3e16774-321e-463f-8ed9-8a996094b1d9',
catalog={
'name': 'New foo catalog'
}
)
if status_code < 300:
print(doc)
Sample Response
{u'name': u'Foo catalog', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'products': [{u'product': {u'status': u'ACTIVE', u'sku': u'Foo2', u'name': u'Foo 2', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'type': u'SIMPLE', u'price': {u'currency': u'USD', u'amount': 600}, u'updatedAt': u'2017-08-28T07:47:14Z', u'shortCode': u'Foo2', u'id': u'74c89006-ea3c-4c28-8a13-408b77cbe16c', u'createdAt': u'2017-08-28T07:47:14Z'}, u'displayOrder': 1}], u'updatedAt': u'2017-08-28T07:47:14Z', u'id': u'365febc2-28b6-411e-85d7-7a57f72ff597', u'createdAt': u'2017-08-28T07:47:14Z'}
Update catalog
Update a catalog.
Arguments
businessId
path- string (required)
catalogId
path- string (required)
patch
body- JsonPatch (optional)
Response
Returns a Catalog.
Definition
DELETE /businesses/{businessId}/catalogs/{catalogId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.deleteCatalog = function deleteCatalog(options, next) { ... }
/**
* Deletes a single catalog for a business.
* @param {String} options.businessId
* @param {String} options.catalogId
*/
Sample Request
poynt.deleteCatalog({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
catalogId : 'e3e16774-321e-463f-8ed9-8a996094b1d9'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{}
Definition
@classmethod
def delete_catalog(cls, business_id, catalog_id):
"""
Deletes a single catalog for a business.
Arguments:
business_id (str): the business ID
catalog_id (str): the catalog ID
"""
Sample Request
doc, status_code = poynt.Catalog.delete_catalog(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'e3e16774-321e-463f-8ed9-8a996094b1d9'
)
if status_code < 300:
print(doc)
Sample Response
None
Delete catalog
Delete a catalog.
Arguments
businessId
path- string (required)
catalogId
path- string (required)
Definition
POST /businesses/{businessId}/catalogs/{catalogId}/categories
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.createCategory = function createCategory(options, category, next) { ... }
/**
* Creates a category on a catalog for a business.
* @param {String} options.businessId
* @param {String} options.catalogId
* @param {Category} category
* @return {Category} category
*/
Sample Request
poynt.createCategory({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
catalogId : '365febc2-28b6-411e-85d7-7a57f72ff597'
}, {
name : 'Category',
shortCode : 'Cat'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"id": "d2c335c9-a771-469f-a0b3-633977aea290",
"name": "Category",
"shortCode": "Cat"
}
Definition
@classmethod
def create_category(cls, business_id, catalog_id, category):
"""
Creates a category on a catalog on a business.
Arguments:
business_id (str): the business ID
catalog_id (str): the catalog ID
category (dict): the category object
"""
Sample Request
doc, status_code = poynt.Catalog.create_category(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'365febc2-28b6-411e-85d7-7a57f72ff597',
{
'name': 'Category',
'shortCode': 'Cat'
}
)
if status_code < 300:
print(doc)
Sample Response
{u'shortCode': u'Cat', u'id': u'4ab8a489-a3fc-4124-87f0-91f8b6044407', u'name': u'Category'}
Create category
Create a category for a catalog.
Arguments
businessId
path- string (required)
catalogId
path- string (required)
category
body- Category (optional)
Response
Returns a Category.
Definition
GET /businesses/{businessId}/catalogs/{catalogId}/categories/lookup
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.lookupCategories = function lookupCategories(options, next) { ... }
/**
* Gets multiple categories on a catalog by IDs.
* @param {String} options.businessId
* @param {String} options.catalogId
* @param {String[]} options.ids
* @return {Category[]} categories
*/
Sample Request
poynt.lookupCategories({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
catalogId : '365febc2-28b6-411e-85d7-7a57f72ff597',
ids : ['4ab8a489-a3fc-4124-87f0-91f8b6044407']
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"categories": [
{
"id": "4ab8a489-a3fc-4124-87f0-91f8b6044407",
"name": "Category",
"shortCode": "Cat"
}
]
}
Definition
@classmethod
def lookup_categories(cls, business_id, catalog_id, category_ids):
"""
Gets multiple categories on a catalog by IDs.
Arguments:
business_id (str): the business ID
catalog_id (str): the catalog ID
category_ids (list of str): a list of category ids
"""
Sample Request
doc, status_code = poynt.Catalog.lookup_categories(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'365febc2-28b6-411e-85d7-7a57f72ff597',
['4ab8a489-a3fc-4124-87f0-91f8b6044407']
)
if status_code < 300:
print(doc)
Sample Response
{u'categories': [{u'shortCode': u'Cat', u'id': u'4ab8a489-a3fc-4124-87f0-91f8b6044407', u'name': u'Category'}]}
Get Multiple Id
Get multiple category by ids.
Arguments
businessId
path- string (required)
catalogId
path- string (required)
ids
query- string (required)
Response
Returns a CategoryList.
Definition
GET /businesses/{businessId}/catalogs/{catalogId}/categories/{categoryId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getCategory = function getCategory(options, next) { ... }
/**
* Get a single category in a catalog for a business.
* @param {String} options.businessId
* @param {String} options.catalogId
* @param {String} options.categoryId
* @return {Category} category
*/
Sample Request
poynt.getCategory({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
catalogId : '365febc2-28b6-411e-85d7-7a57f72ff597',
categoryId : '4ab8a489-a3fc-4124-87f0-91f8b6044407'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"id": "4ab8a489-a3fc-4124-87f0-91f8b6044407",
"name": "Category",
"shortCode": "Cat"
}
Definition
@classmethod
def get_category(cls, business_id, catalog_id, category_id):
"""
Get a single category in a catalog for a business.
Arguments:
business_id (str): the business ID
catalog_id (str): the catalog ID
category_id (str): the category ID
"""
Sample Request
doc, status_code = poynt.Catalog.get_category(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'365febc2-28b6-411e-85d7-7a57f72ff597',
'4ab8a489-a3fc-4124-87f0-91f8b6044407'
)
if status_code < 300:
print(doc)
Sample Response
{u'shortCode': u'Cat', u'id': u'4ab8a489-a3fc-4124-87f0-91f8b6044407', u'name': u'Category'}
Get category by id
Getall a category by id.
Arguments
businessId
path- string (required)
catalogId
path- string (required)
categoryId
path- string (required)
Response
Returns a Category.
Definition
DELETE /businesses/{businessId}/catalogs/{catalogId}/categories/{categoryId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.deleteCategory = function deleteCategory(options, next) { ... }
/**
* Deletes a category by ID.
* @param {String} options.businessId
* @param {String} options.catalogId
* @param {String} options.categoryId
* @return {Category} category
*/
Sample Request
poynt.deleteCategory({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
catalogId : '365febc2-28b6-411e-85d7-7a57f72ff597',
categoryId : '4ab8a489-a3fc-4124-87f0-91f8b6044407'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{}
Definition
@classmethod
def delete_category(cls, business_id, catalog_id, category_id):
"""
Deletes a category by ID.
Arguments:
business_id (str): the business ID
catalog_id (str): the catalog ID
category_id (str): the category ID
"""
Sample Request
doc, status_code = poynt.Catalog.delete_category(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'365febc2-28b6-411e-85d7-7a57f72ff597',
'4ab8a489-a3fc-4124-87f0-91f8b6044407'
)
if status_code < 300:
print(doc)
Sample Response
None
Delete category
Delete a category.
Arguments
businessId
path- string (required)
catalogId
path- string (required)
categoryId
path- string (required)
Definition
PATCH /businesses/{businessId}/catalogs/{catalogId}/categories/{categoryId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.updateCategory = function updateCategory(options, categoryOrPatch, next) { ... }
/**
* Updates a category by ID. Can either specify the whole category, or an array
* of JSON Patch instructions.
* @param {String} options.businessId - the business ID
* @param {String} options.catalogId - the catalog ID
* @param {String} options.categoryId - the category ID
* @param {Boolean} options.noRemove - don't remove any keys from old category in
* the patch. safer this way. defaults to true
* @param {Object} categoryOrPatch - if is an array, will treat as JSON patch;
* if object, will treat as category
* @return {Category} category
*/
Sample Request
poynt.updateCategory({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
catalogId : '365febc2-28b6-411e-85d7-7a57f72ff597',
categoryId : 'd2c335c9-a771-469f-a0b3-633977aea290'
}, {
name : 'Category 2'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"id": "d2c335c9-a771-469f-a0b3-633977aea290",
"name": "Category 2",
"shortCode": "Cat"
}
Definition
@classmethod
def update_category(cls, business_id, catalog_id, category_id, category=None, patch=None, no_remove=True):
"""
Updates a category by ID. Can either specify the whole category, or an array
of JSON Patch instructions.
Arguments:
business_id (str): the business ID
catalog_id (str): the catalog ID
category_id (str): the category ID
Keyword arguments:
category (dict): the category object
patch (list of dict): JSON Patch update instructions
no_remove (boolean, optional): don't remove any keys from old category in the patch.
safer this way. defaults to True
"""
Sample Request
doc, status_code = poynt.Catalog.update_category(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'365febc2-28b6-411e-85d7-7a57f72ff597',
'd2c335c9-a771-469f-a0b3-633977aea290',
category={
'name': 'Category 2'
}
)
if status_code < 300:
print(doc)
Sample Response
{u'shortCode': u'Cat', u'id': u'd2c335c9-a771-469f-a0b3-633977aea290', u'name': u'Category 2'}
Update category
Update a category.
Arguments
businessId
path- string (required)
catalogId
path- string (required)
categoryId
path- string (required)
patch
body- JsonPatch (optional)
Response
Returns a Category.
Taxes
Merchants must collect appropriate taxes based on the location their business and the products they sell. A tax, once defined, can be associated at the catalog, category, or individual product level.
Definition
GET /businesses/{businessId}/taxes
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getTaxes = function getTaxes(options, next) { ... }
/**
* Get a list of taxes
* @param {String} options.businessId
* @param {String} options.startAt (optional)
* @param {Integer} options.startOffset (optional)
* @param {String} options.endAt (optional)
* @param {Integer} options.limit (optional)
* @return {TaxList} taxes
*/
Sample Request
poynt.getTaxes({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
startOffset : 0,
limit : 1
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"links": [
{
"href": "/businesses/18f071cc-5ed4-4b33-80c1-305056d42bfb/taxes?startAt=2017-07-28T17%3A31%3A38Z&endAt=2017-08-28T08%3A09%3A46Z&limit=1",
"method": "GET",
"rel": "next"
}
],
"taxes": [
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-04-05T00:18:39Z",
"id": "0f60100b-5332-44b3-9e40-8cb3106be1bc",
"name": "CF Sales",
"rate": 8.25,
"type": "sales",
"updatedAt": "2017-04-05T00:18:39Z"
}
]
}
Definition
@classmethod
def get_taxes(cls, business_id, start_at=None, start_offset=None,
end_at=None, limit=None):
"""
Get a list of taxes at a business.
Arguments:
business_id (str): the business ID
Keyword arguments:
start_at (int, optional): get taxes created after this time in seconds
start_offset (int, optional): the numeric offset to start the list (for pagination)
end_at (int, optional): get taxes created before this time in seconds
limit (int, optional): how many taxes to return (for pagination)
"""
Sample Request
doc, status_code = poynt.Tax.get_taxes(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
start_offset=0,
limit=1
)
if status_code < 300:
print(doc)
Sample Response
{u'taxes': [{u'name': u'CF Sales', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'rate': 8.25, u'updatedAt': u'2017-04-05T00:18:39Z', u'type': u'sales', u'id': u'0f60100b-5332-44b3-9e40-8cb3106be1bc', u'createdAt': u'2017-04-05T00:18:39Z'}], u'links': [{u'href': u'/businesses/18f071cc-5ed4-4b33-80c1-305056d42bfb/taxes?startAt=2017-07-28T17%3A31%3A38Z&endAt=2017-08-28T08%3A10%3A24Z&limit=1', u'method': u'GET', u'rel': u'next'}]}
Get List
Get all tax rate for this business.
Arguments
If-Modified-Since
header- string (optional)
startAt
query- string (optional)
startOffset
query- integer (optional)
endAt
query- string (optional)
limit
query- integer (optional)
businessId
path- string (required)
Response
Returns a TaxList.
Definition
POST /businesses/{businessId}/taxes
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.createTax = function createTax(options, tax, next) { ... }
/**
* Creates a tax on a business.
* @param {String} options.businessId
* @param {Tax} tax
* @return {Tax} tax
*/
Sample Request
poynt.createTax({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb'
}, {
businessId: '18f071cc-5ed4-4b33-80c1-305056d42bfb',
name: 'Sales tax',
description: 'California sales tax',
type: 'SALES',
rate: 8.25
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-08-28T08:13:02Z",
"description": "California sales tax",
"id": "a0e9a94f-5821-4511-8966-7f8ca3c42167",
"name": "Sales tax",
"rate": 8.25,
"type": "SALES",
"updatedAt": "2017-08-28T08:13:02Z"
}
Definition
@classmethod
def create_tax(cls, business_id, tax):
"""
Creates a tax on a business.
Arguments:
business_id (str): the business ID
tax (dict): the full tax object
"""
Sample Request
doc, status_code = poynt.Tax.create_tax(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
{
'businessId': '18f071cc-5ed4-4b33-80c1-305056d42bfb',
'name': 'Sales tax',
'description': 'California sales tax',
'type': 'SALES',
'rate': 8.25
}
)
if status_code < 300:
print(doc)
Sample Response
{u'name': u'Sales tax', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'rate': 8.25, u'updatedAt': u'2017-08-28T08:12:19Z', u'type': u'SALES', u'id': u'de581e36-fd76-433d-b104-416978d8d01b', u'createdAt': u'2017-08-28T08:12:19Z', u'description': u'California sales tax'}
Create
Create a tax rate definition for a business.
Arguments
businessId
path- string (required)
tax
body- Tax (optional)
Response
Returns a Tax.
Definition
DELETE /businesses/{businessId}/taxes/{taxId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.deleteTax = function deleteTax(options, next) { ... }
/**
* Deactivates a tax. Deactivated taxes will be removed from all catalog
* references.
* @param {String} options.businessId
* @param {String} options.taxId
* @return {Tax} tax
*/
Sample Request
poynt.deleteTax({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
taxId : 'a0e9a94f-5821-4511-8966-7f8ca3c42167'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{}
Definition
@classmethod
def delete_tax(cls, business_id, tax_id):
"""
Deletes a tax.
Arguments:
business_id (str): the business ID
tax_id (str): the tax ID
"""
Sample Request
doc, status_code = poynt.Tax.delete_tax(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'a0e9a94f-5821-4511-8966-7f8ca3c42167'
)
if status_code < 300:
print(doc)
Sample Response
None
Delete tax
Delete a tax.
Arguments
businessId
path- string (required)
taxId
path- string (required)
Definition
GET /businesses/{businessId}/taxes/{taxId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getTax = function getTax(options, next) { ... }
/**
* Get a single tax for a business.
* @param {String} options.businessId
* @param {String} options.taxId
* @return {Tax} tax
*/
Sample Request
poynt.getTax({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
taxId : 'de581e36-fd76-433d-b104-416978d8d01b'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-08-28T08:12:19Z",
"description": "California sales tax",
"id": "de581e36-fd76-433d-b104-416978d8d01b",
"name": "Sales tax",
"rate": 8.25,
"type": "SALES",
"updatedAt": "2017-08-28T08:12:19Z"
}
Definition
@classmethod
def get_tax(cls, business_id, tax_id):
"""
Get a single tax for a business.
Arguments:
business_id (str): the business ID
tax_id (str): the tax ID
"""
Sample Request
doc, status_code = poynt.Tax.get_tax(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'de581e36-fd76-433d-b104-416978d8d01b'
)
if status_code < 300:
print(doc)
Sample Response
{u'name': u'Sales tax', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'rate': 8.25, u'updatedAt': u'2017-08-28T08:12:19Z', u'type': u'SALES', u'id': u'de581e36-fd76-433d-b104-416978d8d01b', u'createdAt': u'2017-08-28T08:12:19Z', u'description': u'California sales tax'}
Get
Get a tax rate detail.
Arguments
If-Modified-Since
header- string (optional)
businessId
path- string (required)
taxId
path- string (required)
Response
Returns a Tax.
Definition
PATCH /businesses/{businessId}/taxes/{taxId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.updateTax = function updateTax(options, taxOrPatch, next) { ... }
/**
* Updates a tax by ID. Can either specify the whole tax, or an array
* of JSON Patch instructions.
* @param {String} options.businessId - the business ID
* @param {String} options.taxId - the tax ID
* @param {Boolean} options.noRemove - don't remove any keys from old tax in
* the patch. safer this way. defaults to true
* @param {Object} taxOrPatch - if is an array, will treat as JSON patch;
* if object, will treat as tax
* @return {Tax} tax
*/
Sample Request
poynt.updateTax({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
taxId : 'de581e36-fd76-433d-b104-416978d8d01b'
}, {
name : 'New sales tax',
rate : 8.3
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"createdAt": "2017-08-28T08:12:19Z",
"updatedAt": "2017-08-28T08:17:47Z",
"rate": 8.3,
"id": "de581e36-fd76-433d-b104-416978d8d01b",
"name": "New sales tax",
"description": "California sales tax",
"type": "SALES",
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb"
}
Definition
@classmethod
def update_tax(cls, business_id, tax_id, tax=None, patch=None, no_remove=True):
"""
Updates a tax by ID. Can either specify the whole tax, or an array
of JSON Patch instructions.
Arguments:
business_id (str): the business ID
tax_id (str): the tax ID
Keyword arguments:
tax (dict): the full tax object
patch (list of dict): JSON Patch update instructions
no_remove (boolean, optional): don't remove any keys from old tax in the patch.
safer this way. defaults to True
"""
Sample Request
doc, status_code = poynt.Tax.update_tax(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'de581e36-fd76-433d-b104-416978d8d01b',
tax={
'name': 'New sales tax',
'rate': 8.3
}
)
if status_code < 300:
print(doc)
Sample Response
{u'name': u'Sales tax', u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'rate': 8.25, u'updatedAt': u'2017-08-28T08:12:19Z', u'type': u'SALES', u'id': u'de581e36-fd76-433d-b104-416978d8d01b', u'createdAt': u'2017-08-28T08:12:19Z', u'description': u'California sales tax'}
Update
Update tax details.
Arguments
businessId
path- string (required)
taxId
path- string (required)
patch
body- JsonPatch (optional)
Response
Returns a Tax.
Notifications
Cloud Messages can be sent from the cloud applications running on the Poynt Smart Terminal.
Webhooks allow developers to register their application to receive callback events from Poynt or replay missed events.
To register for an event type, the developer can create a hook specifying the business and event type they would like to receive callbacks on. This can be done programmatically or via our developer portal UI.
When an event matching the criterias defined in a hook happens, a delivery is made to the developer application endpoint. Webhook deliveries can be redelivered or lookup based on time range as needed.
Cloudmessages
A message sent from the cloud through the Poynt Cloud Messaging to applications running on the Poynt Smart Terminal.
Definition
POST /cloudMessages
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.sendCloudMessage = function sendCloudMessage(options, next) { ... }
/**
* Send a message from the cloud to your application running at a Poynt terminal.
* @param {String} options.businessId
* @param {String} options.storeId
* @param {String} options.recipientClassName
* @param {String} options.recipientPackageName
* @param {String} options.deviceId
* @param {String} options.serialNumber
* @param {String} options.data (optional) - defaults to "{}"
* @param {String} options.ttl (optional) - defaults to 900 seconds or 15 min
* @param {String} options.collapseKey (optional)
*/
Sample Request
poynt.sendCloudMessage({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
storeId : 'c394627f-4f68-47fb-90a5-684ea801a352',
deviceId : 'urn:tid:48c54303-6d51-39af-bdeb-4af53f621652',
recipientClassName : 'FooClass',
recipientPackageName : 'co.poynt.testapp',
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{}
Definition
@classmethod
def send_cloud_message(cls, business_id=None, store_id=None,
class_name=None, package_name=None, device_id=None,
serial_number=None, data='{}', collapse_key=None,
ttl=900):
"""
Send a message from the cloud to your application running at a Poynt terminal.
Keyword arguments:
business_id (str): the business ID
store_id (str): the store ID
class_name (str): the class name of the receiver in your app
package_name (str): the package name of your app
device_id (str): the device ID
serial_number (str): the serial number
data (str, optional): the data to send. defaults to {}
collapse_key (str, optional): dedupe messages on this key
ttl (int, optional): how long until the cloud message expires. defaults
to 900 seconds
"""
Sample Request
doc, status_code = poynt.CloudMessage.send_cloud_message(
business_id='18f071cc-5ed4-4b33-80c1-305056d42bfb',
store_id='c394627f-4f68-47fb-90a5-684ea801a352',
device_id='urn:tid:48c54303-6d51-39af-bdeb-4af53f621652',
class_name='foo',
package_name='co.poynt.testapp',
)
if status_code < 300:
print(doc)
Sample Response
None
Send cloud message
Send a message from the cloud to your application running at a Poynt terminal.
Arguments
message
body- CloudMessage (optional)
Hooks
A hook represent an application's registration to be notified should a particular resource event occurs.
Definition
GET /hooks
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getHooks = function getHooks(options, next) { ... }
/**
* Gets a list of hooks currently subscribed to.
* @param {String} options.businessId
*/
Sample Request
poynt.getHooks({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"hooks": [
{
"active": true,
"applicationId": "urn:aid:cb2c55f6-7dfe-482e-a6da-e27c683edf0a",
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-08-28T08:25:46Z",
"deliveryUrl": "http://www.ftyyy.cn/hooks",
"eventTypes": [
"TRANSACTION_AUTHORIZED",
"TRANSACTION_CAPTURED",
"TRANSACTION_REFUNDED",
"TRANSACTION_UPDATED",
"TRANSACTION_VOIDED"
],
"id": "4852ebb4-36bf-4060-9ed4-1c3150ddfab6",
"secret": "********",
"updatedAt": "2017-08-28T08:25:46Z"
}
]
}
Definition
@classmethod
def get_hooks(cls, business_id):
"""
Gets a list of hooks currently subscribed to.
Arguments:
business_id (str): use a merchant business ID to see what webhooks your app
is subscribed to for that merchant. use your own organization
ID to see your app billing webhooks, etc.
"""
Sample Request
doc, status_code = poynt.Hook.get_hooks(
'18f071cc-5ed4-4b33-80c1-305056d42bfb'
)
if status_code < 300:
print(doc)
Sample Response
{u'hooks': [{u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'deliveryUrl': u'http://www.ftyyy.cn/hooks', u'secret': u'********', u'updatedAt': u'2017-08-28T08:25:46Z', u'active': True, u'eventTypes': [u'TRANSACTION_AUTHORIZED', u'TRANSACTION_CAPTURED', u'TRANSACTION_REFUNDED', u'TRANSACTION_UPDATED', u'TRANSACTION_VOIDED'], u'applicationId': u'urn:aid:cb2c55f6-7dfe-482e-a6da-e27c683edf0a', u'id': u'4852ebb4-36bf-4060-9ed4-1c3150ddfab6', u'createdAt': u'2017-08-28T08:25:46Z'}]}
Get List
Get all webhooks since time. Result is paginated
Arguments
If-Modified-Since
header- string (optional)
startAt
query- string (optional)
startOffset
query- integer (optional)
endAt
query- string (optional)
limit
query- integer (optional)
businessId
query- string (required)
Response
Returns a HookList.
Definition
POST /hooks
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.createHook = function createHook(options, next) { ... }
/**
* Subscribes to a webhook.
* @param {String} options.eventType
* @param {String[]} options.eventTypes
* @param {String} options.businessId
* @param {String} options.deliveryUrl
* @param {String} options.secret
*/
Sample Request
poynt.createHook({
businessId : '18f071cc-5ed4-4b33-80c1-305056d42bfb',
eventTypes : ['TRANSACTION_AUTHORIZED', 'TRANSACTION_CAPTURED', 'TRANSACTION_REFUNDED', 'TRANSACTION_UPDATED', 'TRANSACTION_VOIDED'],
deliveryUrl : 'http://www.ftyyy.cn/hooks',
secret : 'poynt123'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"active": true,
"applicationId": "urn:aid:cb2c55f6-7dfe-482e-a6da-e27c683edf0a",
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-08-28T08:25:46Z",
"deliveryUrl": "http://www.ftyyy.cn/hooks",
"eventTypes": [
"TRANSACTION_AUTHORIZED",
"TRANSACTION_CAPTURED",
"TRANSACTION_REFUNDED",
"TRANSACTION_UPDATED",
"TRANSACTION_VOIDED"
],
"id": "4852ebb4-36bf-4060-9ed4-1c3150ddfab6",
"secret": "********",
"updatedAt": "2017-08-28T08:25:46Z"
}
Definition
@classmethod
def create_hook(cls, business_id, delivery_url, secret=None, event_type=None,
event_types=None):
"""
Subscribes to a webhook.
Arguments:
business_id (str): the business ID to subscribe to a hook for. Use a merchant
business ID to subscribe to their e.g. transaction hooks;
use your own organization ID to subscribe to app billing, etc.
delivery_url (str): the URL to deliver webhooks to.
Keyword arguments:
secret (str, optional): used to sign the webhook event, so you can verify.
event_type (str, optional): a single event type to subscribe to webhooks for.
event_types (list of str, optional): a list of event types to subscribe to webhooks for.
"""
Sample Request
doc, status_code = poynt.Hook.create_hook(
'18f071cc-5ed4-4b33-80c1-305056d42bfb',
'http://www.ftyyy.cn/hooks',
secret='poynt123',
event_types=['TRANSACTION_AUTHORIZED', 'TRANSACTION_CAPTURED',
'TRANSACTION_REFUNDED', 'TRANSACTION_UPDATED', 'TRANSACTION_VOIDED']
)
if status_code < 300:
print(doc)
Sample Response
{u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'deliveryUrl': u'http://www.ftyyy.cn/hooks', u'secret': u'********', u'updatedAt': u'2017-08-28T08:28:55Z', u'active': True, u'eventTypes': [u'TRANSACTION_AUTHORIZED', u'TRANSACTION_CAPTURED', u'TRANSACTION_REFUNDED', u'TRANSACTION_UPDATED', u'TRANSACTION_VOIDED'], u'applicationId': u'urn:aid:cb2c55f6-7dfe-482e-a6da-e27c683edf0a', u'id': u'0f9bc70f-1de4-4cb7-83a5-248fc358ad56', u'createdAt': u'2017-08-28T08:28:55Z'}
Create
Create a web hook. Client application MUST have already have been authorized by the business to access the resource of the events in this hook. The following webhooks event are available:
- BUSINESS_USER_CREATED - published when a business (terminal) user is created
- BUSINESS_USER_UPDATED - published when a business (terminal) user is updated
- CATALOG_CREATED - published when a catalog is created
- CATALOG_UPDATED - published when a catalog is updated
- CATALOG_DELETED - published when a catalog is deleted
- CATEGORY_CREATED - published when a category is created
- CATEGORY_UPDATED - published when a category is updated
- CATEGORY_DELETED - published when a category is deleted
- INVENTORY_UPDATED - published when inventory is updated
- ORDER_OPENED - published when a new order is OPENED
- ORDER_CANCELLED - published when an order is CANCELLED
- ORDER_COMPLETED - published when an order is COMPLETED
- ORDER_UPDATED - published when anything other than status changes in the order
- ORDER_ITEM_ORDERED - published when a new item is ORDERED
- ORDER_ITEM_FULFILLED - published when an item is FULFILLED
- ORDER_ITEM_RETURNED - published when an item is RETURNED
- ORDER_ITEM_DELETED - published when an item is DELETED
- ORDER_ITEM_UPDATED - published when anything other than status changes in the item
- PRODUCT_CREATED - published when a new product is created
- PRODUCT_UPDATED - published when product is updated
- PRODUCT_DELETED - published when product is deleted
- STORE_CREATED - published when a store is created
- STORE_UPDATED - published when a store is updated
- TAX_CREATED - published when a new tax is created
- TAX_UPDATED - published when a tax is updated
- TAX_DELETED - published when a tax is deleted
- TRANSACTION_AUTHORIZED - published when a transaction is authorized
- TRANSACTION_CAPTURED - published when a transaction is captured
- TRANSACTION_REFUNDED - published when a captured transaction is refunded
- TRANSACTION_UPDATED - published when a transaction is updated
- TRANSACTION_VOIDED - published when a transaction is voided
- USER_CREATED - published when a web/HQ user is created
- USER_JOIN_ORG - published when a web/HQ user joins a developer organization
- USER_LEAVE_ORG - published when a web/HQ user leaves a developer organization
- USER_JOIN_BIZ - published when a web/HQ user joins a business
- USER_LEAVE_BIZ - published when a web/HQ user leaves a business
- USER_UPDATED - published when a web/HQ user is updated
Arguments
hook
body- Hook (optional)
Response
Returns a Hook.
Definition
DELETE /hooks/{hookId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.deleteHook = function deleteHook(options, next) { ... }
/**
* Deletes a hook.
* @param {String} options.hookId
*/
Sample Request
poynt.deleteHook({
hookId : '0f9bc70f-1de4-4cb7-83a5-248fc358ad56'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{}
Definition
@classmethod
def delete_hook(cls, hook_id):
"""
Deletes a hook.
Arguments:
hook_id (str): hook ID
"""
Sample Request
doc, status_code = poynt.Hook.delete_hook(
'0f9bc70f-1de4-4cb7-83a5-248fc358ad56'
)
if status_code < 300:
print(doc)
Sample Response
None
Delete hook
Marks the hook as not active (i.d. "active":false
).
Arguments
hookId
path- string (required)
Definition
GET /hooks/{hookId}
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
module.exports.getHook = function getHook(options, next) { ... }
/**
* Gets a hook by ID.
* @param {String} options.hookId
*/
Sample Request
poynt.getHook({
hookId : '0f9bc70f-1de4-4cb7-83a5-248fc358ad56'
}, function (err, doc) {
if (err) {
throw err;
}
console.log(JSON.stringify(doc));
});
Sample Response
{
"active": true,
"applicationId": "urn:aid:cb2c55f6-7dfe-482e-a6da-e27c683edf0a",
"businessId": "18f071cc-5ed4-4b33-80c1-305056d42bfb",
"createdAt": "2017-08-28T08:28:55Z",
"deliveryUrl": "http://www.ftyyy.cn/hooks",
"eventTypes": [
"TRANSACTION_AUTHORIZED",
"TRANSACTION_CAPTURED",
"TRANSACTION_REFUNDED",
"TRANSACTION_UPDATED",
"TRANSACTION_VOIDED"
],
"id": "0f9bc70f-1de4-4cb7-83a5-248fc358ad56",
"secret": "********",
"updatedAt": "2017-08-28T08:28:55Z"
}
Definition
@classmethod
def get_hook(cls, hook_id):
"""
Gets a hook by ID.
Arguments:
hook_id (str): hook ID
"""
Sample Request
doc, status_code = poynt.Hook.get_hook(
'0f9bc70f-1de4-4cb7-83a5-248fc358ad56'
)
if status_code < 300:
print(doc)
Sample Response
{u'businessId': u'18f071cc-5ed4-4b33-80c1-305056d42bfb', u'deliveryUrl': u'http://www.ftyyy.cn/hooks', u'secret': u'********', u'updatedAt': u'2017-08-28T08:28:55Z', u'active': True, u'eventTypes': [u'TRANSACTION_AUTHORIZED', u'TRANSACTION_CAPTURED', u'TRANSACTION_REFUNDED', u'TRANSACTION_UPDATED', u'TRANSACTION_VOIDED'], u'applicationId': u'urn:aid:cb2c55f6-7dfe-482e-a6da-e27c683edf0a', u'id': u'0f9bc70f-1de4-4cb7-83a5-248fc358ad56', u'createdAt': u'2017-08-28T08:28:55Z'}
Get By Id
Get a hook by id.
Arguments
If-Modified-Since
header- string (optional)
hookId
path- string (required)
Response
Returns a Hook.
Delivery
When a event occurs which matches the registered Hooks of an application, a delivery is made to the registered delivery url. Delivery are attempted up to 10 times with exponential backoff should there be a failure reaching the delivery url.
Definition
GET /businesses/{businessId}/deliveries
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
This method is currently not possible using the Node.js SDK.
Definition
This method is currently not possible using the Python SDK.
Get List
Get all webhook delivery since time. Result is paginated
Arguments
If-Modified-Since
header- string (optional)
startAt
query- string (optional)
startOffset
query- integer (optional)
endAt
query- string (optional)
limit
query- integer (optional)
businessId
path- string (required)
Response
Returns a DeliveryList.
Definition
POST /businesses/{businessId}/deliveries/redeliver
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
This method is currently not possible using the Node.js SDK.
Definition
This method is currently not possible using the Python SDK.
Redeliver By Time
Redeliver all webhook within a time window.
Arguments
businessId
path- string (required)
startTime
query- string (required)
endTime
query- string (required)
Definition
POST /businesses/{businessId}/deliveries/{deliveryId}/redeliver
Sample Request
TODO: Add request
Sample Response
TODO: Add response
Definition
This method is currently not possible using the Node.js SDK.
Definition
This method is currently not possible using the Python SDK.
Redeliver Event
Redeliver a webhook delivery.
Arguments
businessId
path- string (required)
deliveryId
path- string (required)
Response
Returns a Delivery.
AVSResult
Attributes
addressResult
- string, enum['MATCH', 'NO_MATCH', 'PARTIAL_MATCH', 'NOT_PROVIDED', 'ISSUER_NOT_CERTIFIED', 'NO_RESPONSE_FROM_CARD_ASSOCIATION', 'UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION', 'NOT_VERIFIED', 'BAD_FORMAT', 'ERROR', 'UNSUPPORTED_BY_ISSUER', 'UNAVAILABLE']
stateResult
- string, enum['MATCH', 'NO_MATCH', 'PARTIAL_MATCH', 'NOT_PROVIDED', 'ISSUER_NOT_CERTIFIED', 'NO_RESPONSE_FROM_CARD_ASSOCIATION', 'UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION', 'NOT_VERIFIED', 'BAD_FORMAT', 'ERROR', 'UNSUPPORTED_BY_ISSUER', 'UNAVAILABLE']
countryResult
- string, enum['MATCH', 'NO_MATCH', 'PARTIAL_MATCH', 'NOT_PROVIDED', 'ISSUER_NOT_CERTIFIED', 'NO_RESPONSE_FROM_CARD_ASSOCIATION', 'UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION', 'NOT_VERIFIED', 'BAD_FORMAT', 'ERROR', 'UNSUPPORTED_BY_ISSUER', 'UNAVAILABLE']
phoneResult
- string, enum['MATCH', 'NO_MATCH', 'PARTIAL_MATCH', 'NOT_PROVIDED', 'ISSUER_NOT_CERTIFIED', 'NO_RESPONSE_FROM_CARD_ASSOCIATION', 'UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION', 'NOT_VERIFIED', 'BAD_FORMAT', 'ERROR', 'UNSUPPORTED_BY_ISSUER', 'UNAVAILABLE']
cardHolderNameResult
- string, enum['MATCH', 'NO_MATCH', 'PARTIAL_MATCH', 'NOT_PROVIDED', 'ISSUER_NOT_CERTIFIED', 'NO_RESPONSE_FROM_CARD_ASSOCIATION', 'UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION', 'NOT_VERIFIED', 'BAD_FORMAT', 'ERROR', 'UNSUPPORTED_BY_ISSUER', 'UNAVAILABLE']
cityResult
- string, enum['MATCH', 'NO_MATCH', 'PARTIAL_MATCH', 'NOT_PROVIDED', 'ISSUER_NOT_CERTIFIED', 'NO_RESPONSE_FROM_CARD_ASSOCIATION', 'UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION', 'NOT_VERIFIED', 'BAD_FORMAT', 'ERROR', 'UNSUPPORTED_BY_ISSUER', 'UNAVAILABLE']
actualResult
- string
postalCodeResult
- string, enum['MATCH', 'NO_MATCH', 'PARTIAL_MATCH', 'NOT_PROVIDED', 'ISSUER_NOT_CERTIFIED', 'NO_RESPONSE_FROM_CARD_ASSOCIATION', 'UNKNOWN_RESPONSE_FROM_CARD_ASSOCIATION', 'NOT_VERIFIED', 'BAD_FORMAT', 'ERROR', 'UNSUPPORTED_BY_ISSUER', 'UNAVAILABLE']
ActiveTime
Attributes
repeatType
- string, enum['DAILY', 'WEEKLY', 'MONTHLY']
every
- array [long]
endAt
- string
The time in ISO-8601 format. E.g. 2014-09-11T23:14:44Z. startAt
- string
The time in ISO-8601 format. E.g. 2014-09-11T23:14:44Z. startHour
- integer
endHour
- integer
Address
Attributes
postalCodeExtension
- string
status
- string, enum['ADDED']
territoryType
- string, enum['STATE', 'PROVINCE', 'OTHER']
TerritoryType enum and territory go hand in hand. This enum specifies what kind of territory is in the territory field. E.g. in the US, this will typically be STATE. countryCode
- string
line1
- string
line2
- string
updatedAt
- string
The time (in ISO-8601 format) at which the address was updated. E.g. 2014-09-11T23:14:44Z. createdAt
- string
The time (in ISO-8601 format) at which the address was created. E.g. 2014-09-11T23:14:44Z. city
- string
territory
- string
postalCode
- string
id
- integer
type
- string, enum['HOME', 'WORK', 'BUSINESS', 'OTHER']
AvailableDiscount
Attributes
scope
- string, enum['ITEM', 'ORDER']
code
- string
fixed
- integer
percentage
- float
when
- ActiveTime
id
- string
type
- string, enum['FIXED', 'PERCENTAGE']
Business
This is the base object for the businesses resource. Businesses resource represents a merchant business.
Attributes
businessUrl
- string
The url of the business' website. industryType
- string
The industry type that this business belongs to. logoUrl
- string
The business' main logo url. description
- string
[Required] A short description of the business. status
- string, enum['ADDED', 'ACTIVATED', 'LOCKED', 'CLOSED']
It is set to ADDED as soon as the business is added into the system. Moved to ACTIVATED once the first terminal is activated. It may move to LOCKED if for whatever reason, operations need to be stopped. It is moved to CLOSED if the business is closed for good. activeSince
- string
This is a response only field. It is set internally and returned in response. The time (in ISO-8601 format) at which the first terminal at the business was activated. E.g. 2014-09-11T23:14:44Z. sic
- string
[Required] The standard industry code of the business. processorData
- object
timezone
- string
[Required] The timezone that the headquarters belong to. processor
- string, enum['CHASE_PAYMENTECH', 'REDE', 'EVO', 'FIRST_DATA', 'GLOBAL_PAYMENTS', 'HEARTLAND_PAYMENT_SYSTEM', 'ELAVON', 'MERCURY', 'MONERIS', 'PAYPAL', 'STRIPE', 'TSYS', 'VANTIV', 'WORLDPAY', 'EPX', 'BRIDGEPAY', 'CREDITCALL', 'NA_BANCARD', 'MOCK']
acquirer
- string, enum['CHASE_PAYMENTECH', 'REDE', 'EVO', 'FIRST_DATA', 'GLOBAL_PAYMENTS', 'HEARTLAND_PAYMENT_SYSTEM', 'ELAVON', 'MERCURY', 'MONERIS', 'PAYPAL', 'STRIPE', 'TSYS', 'VANTIV', 'WORLDPAY', 'EPX', 'BRIDGEPAY', 'CREDITCALL', 'NA_BANCARD', 'MOCK'] [Required] The acquirer that this business belongs to.
stores
- array [Store]
The list of stores within this business. Not returned by default and requires an additional HTTP GET request to /businesses/{businessId}/stores. mcc
- string
[Required] The merchant category code of the business. updatedAt
- string
ISO 8601 format YYYY-MM-DDThh:mm:ssZ createdAt
- string
ISO 8601 format YYYY-MM-DDThh:mm:ssZ legalName
- string
[Required] The legal name of the business. doingBusinessAs
- string
[Required] The name the business likes to be known as. emailAddress
- string
The main business email address. phone
- Phone
[Required] The main business phone. externalMerchantId
- string
This is the unique identifier assigned by the acquirer to the business. It is a business level MID. address
- Address
[Required] The main business address. id
- string
The id of the business. This id could be generated by the client and passed in. If not passed in, it is generated internally during create business. type
- string, enum['MERCHANT', 'TEST_MERCHANT', 'DEVELOPER', 'DISTRIBUTOR', 'ORGANIZATION'] [Required] The type of business.
attributes
- object
A name/value pair list that could be persisted and later retreived.
BusinessUser
Attributes
employmentDetails
- EmploymentDetails
credentials
- array [UserCredential]
status
- string, enum['EMPLOYED', 'TERMINATED']
email
- string
cards
- array [Card]
emailSignupCode
- string
middleInitial
- string
middleName
- string
userId
- integer
firstName
- string
lastName
- string
nickName
- string
startDate
- integer
endDate
- integer
businessId
- string
UUID version 1, 2, 3, or 4. All server generated values are version 4.
Card
Object to carry credit/debit card information.
Attributes
sequenceNumber
- string
Sequence number to distinguish between 2 cards with same PAN. status
- string, enum['ACTIVE', 'REMOVED']
Status of the card. numberMasked
- string
This is a response field. PAN with everything except first6 and last4 masked. track3data
- string
Track3 for future use. Carries track from custom funding sources. numberHashed
- string
encryptedExpirationDate
- string
If encryption is true, a single encrypted expiration date (containing year, month and possibly date) is provided here. expirationDate
- integer
The date from expiration. Date is typically only present in EMV cards. expirationYear
- integer
The year from expiration. serviceCode
- string
track2data
- string
Required for swiped transactions. Track2 read from the card contains PAN, expiration, etc. expirationMonth
- integer
The month from expiration. keySerialNumber
- string
KeySerialNumber of the Poynt P2PE DUKPT key. If encrypted is true, only one of key and keySerialNumber can be populated (not both). track1data
- string
In some use-cases (like airlines) Track1 is required. Track1 contains some extra information over Track2 (like cardholder's name). numberLast4
- string
This is a response field. The last4 numbers of the PAN. cardHolderFullName
- string
Card holder's full name usually picked from track1. cardHolderFirstName
- string
Card holder's first name usually picked from track1. cardHolderLastName
- string
Card holder's last name usually picked from track1. numberFirst6
- string
This is a response field. The first6 numbers of the PAN. key
- array [CardKeyData]
List of keys and their versions being used. If encrypted is true, only one of key and keySerialNumber can be populated (not both). id
- integer
The id of the card created. type
- string, enum['AMERICAN_EXPRESS', 'MAESTRO', 'DISCOVER', 'DINERS_CLUB', 'JCB', 'MASTERCARD', 'DANKORT', 'OTHER', 'VISA', 'UNIONPAY', 'PAYPAL']
The network card belongs to: DISCOVER, VISA, MASTERCARD, AMEX, etc. number
- string
Required for keyed-in transactions. The card account number (PAN). Not required if Track1 or 2 are available.
CardKeyData
Attributes
version
- string
Version of the key. id
- string, enum['WCK', 'WAEK', 'WMACK']
The key identifier.
Catalog
This is a swagger model description.
Attributes
priceBookId
- string
products
- array [CatalogItem]
availableDiscounts
- array [AvailableDiscount]
taxes
- array [Tax]
businessId
- string
UUID version 1, 2, 3, or 4. All server generated values are version 4. updatedAt
- string
The time (in ISO-8601 format) at which the Catalog was updated. E.g. 2014-09-11T23:14:44Z. createdAt
- string
The time (in ISO-8601 format) at which the Catalog was created. E.g. 2014-09-11T23:14:44Z. categories
- array [Category]
name
- string
id
- string
CatalogItem
An item inside a catalog. Can be a product or a category.
Attributes
availableDiscounts
- array [AvailableDiscount]
displayOrder
- integer
color
- string
id
- string
CatalogItemWithProduct
An item inside a catalog. Can be a product or a category.
Attributes
product
- Product
availableDiscounts
- array [AvailableDiscount]
displayOrder
- integer
color
- string
CatalogWithProduct
This is a swagger model description.
Attributes
products
- array [CatalogItemWithProduct]
availableDiscounts
- array [AvailableDiscount]
taxes
- array [Tax]
businessId
- string
UUID version 1, 2, 3, or 4. All server generated values are version 4. updatedAt
- string
The time (in ISO-8601 format) at which the Catalog was updated. E.g. 2014-09-11T23:14:44Z. createdAt
- string
The time (in ISO-8601 format) at which the Catalog was created. E.g. 2014-09-11T23:14:44Z. categories
- array [CategoryWithProduct]
name
- string
id
- string
Category
A category is a grouping of products with optional display info.
Attributes
products
- array [CatalogItem]
availableDiscounts
- array [AvailableDiscount]
taxes
- array [Tax]
parentCategoryId
- string
shortCode
- string
displayOrder
- integer
color
- string
name
- string
id
- string
CategoryWithProduct
A category is a grouping of products with optional display info.
Attributes
products
- array [CatalogItemWithProduct]
availableDiscounts
- array [AvailableDiscount]
taxes
- array [Tax]
parentCategoryId
- string
shortCode
- string
displayOrder
- integer
color
- string
name
- string
id
- string
ClientContext
Colors the operation with some important context about the client.
Attributes
storeAddressTerritory
- string
storeAddressCity
- string
storeTimezone
- string
source
- string, enum['INSTORE', 'WEB', 'MOBILE', 'CALLIN', 'CATALOG']
This is required if ClientContext is inside Order. The source where the transaction was initiated. transactionInstruction
- string, enum['NONE', 'EXTERNALLY_PROCESSED']
Any instructions about the transaction. EXTERNALLY_PROCESSED implies that this order was paid for outside of the Poynt system. businessType
- string, enum['MERCHANT', 'TEST_MERCHANT', 'DEVELOPER', 'DISTRIBUTOR', 'ORGANIZATION']
The type of the client business. mid
- string
The acquirer assigned merchant ID (aka MID) for this store. tid
- string
The acquirer assigned terminal ID (aka TID) for the terminal. businessId
- string
This is optional as it can always be picked from the JWT token used for authentication. storeId
- string
This is optional as it can always be picked from the JWT token used for authentication. storeDeviceId
- string
This is optional as it can always be picked from the JWT token used for authentication. transmissionAtLocal
- string
This is required if ClientContext is inside Transaction. The time at the terminal (in ISO-8601 format) at the time of the transaction in the terminal's timezone. This comes specially handy in case of offline transactions where the transaction might have happened hours before this data is sent to the server. E.g. 2014-09-11T23:14:44Z. mcc
- string
The business already has an MCC (merchant category code) set during onboarding. That will be used by default. But we can override it per transaction using this field. employeeUserId
- integer
This is optional as it can always be picked from the JWT token used for authentication. sourceApp
- string
CloudMessage
Attributes
collapseKey
- string
sender
- string
data
- string
ttl
- integer
serialNum
- string
recipient
- ComponentName
businessId
- string
UUID version 1, 2, 3, or 4. All server generated values are version 4. storeId
- string
UUID version 1, 2, 3, or 4. All server generated values are version 4. deviceId
- string
id
- string
ComponentName
Attributes
packageName
- string
className
- string
CurrencyAmount
Attributes
amount
- integer
currency
- string
Customer
Attributes
devices
- array [Device]
addresses
- array [Entry]
This represents customer's addresses. It is modeled as a map, where the AddressType enum is the key and the Address object is the value. insights
- CustomerInsights
loyaltyCustomers
- array [LoyaltyCustomer]
nickName
- string
businessPreferences
- CustomerBusinessPreferences
cards
- array [Card]
middleName
- string
middleInitial
- string
businessId
- string
UUID version 1, 2, 3, or 4. All server generated values are version 4. phones
- array [Entry]
This represents customer's phones. It is modeled as a map, where the PhoneType enum is the key and the Phone object is the value. emails
- array [Entry]
This represents customer's emails. It is modeled as a map, where the EmailType enum is the key and the Email object is the value. updatedAt
- string
The time (in ISO-8601 format) at which the Customer was updated. E.g. 2014-09-11T23:14:44Z. createdAt
- string
The time (in ISO-8601 format) at which the Customer was created. E.g. 2014-09-11T23:14:44Z. firstName
- string
lastName
- string
id
- integer
attributes
- object
CustomerBusinessPreferences
Attributes
preferredCardId
- integer
CustomerInsights
Attributes
since
- string
The time (in ISO-8601 format) since when this customer has been on file. E.g. 2014-09-11T23:14:44Z. poyntLoyalty
- PoyntLoyalty
scores
- array [CustomerScore]
topItems
- array [CustomerTopItem]
totalOrders
- integer
lifetimeSpend
- array [CurrencyAmount]
CustomerScore
Attributes
score
- double
type
- string, enum['LOYALTY', 'VALUE', 'OVERALL']
CustomerTopItem
Attributes
variationId
- integer
lastPurchasedAt
- integer
count
- double
countUnit
- string, enum['EACH', 'HOURS', 'DAYS', 'SECONDS', 'CRATE_OF_12', 'SIX_PACH', 'GALLON', 'LITRE', 'INCH', 'FOOT', 'MILLIMETER', 'CENTIMETER', 'METER', 'SQUARE_METER', 'CUBIC_METER', 'GRAM', 'KILOGRAM', 'POUND', 'ANNUAL', 'DEGREE_CELCIUS', 'DEGREE_FARENHEIT']
productId
- integer
firstPurchasedAt
- integer
name
- string
Delivery
Attributes
attempt
- integer
status
- string, enum['SCHEDULED', 'RESCHEDULED', 'ERRORED_RETRYING', 'DELIVERED', 'ERRORED']
eventType
- string
resourceId
- string
applicationId
- string
deliveryUrl
- string
secret
- string
links
- array [Link]
businessId
- string
UUID version 1, 2, 3, or 4. All server generated values are version 4. storeId
- string
UUID version 1, 2, 3, or 4. All server generated values are version 4. deviceId
- string
updatedAt
- string
The time (in ISO-8601 format) at which the Delivery was updated. E.g. 2014-09-11T23:14:44Z. createdAt
- string
The time (in ISO-8601 format) at which the Delivery was created. E.g. 2014-09-11T23:14:44Z. hookId
- string
resource
- string
id
- string
Device
Attributes
macAddresses
- array [DeviceMacAddress]
deviceType
- string, enum['MOBILE', 'UNKNOWN']
id
- integer
DeviceMacAddress
Attributes
macAddress
- string
networkInterface
- string, enum['BLUETOOTH', 'WIFI']
id
- integer
Discount
Details about the item being purchased.
Attributes
amount
- integer
[Required] Amount of discount. customName
- string
[Required] Name of the discount. percentage
- float
Percentage of discount. id
- string
If the discount was applied as a result of a pre-set discount (at the catalog or product level), pass the id of that discount here. provider
- string
processor
- string
processorResponse
- ProcessorResponse
EMVData
All EMV specific data. During an EMV transaction, objects such as Card, TransactionAmounts, ClientContext, etc will be filled. But everything EMV specific ends up here.
Attributes
emvTags
- object
Tags that are not modeled in explicit fields can be passed here. These will be passed untouched to the acquirer.
EmploymentDetails
Attributes
role
- string, enum['OWNER', 'MANAGER', 'EMPLOYEE']
endAt
- integer
startAt
- integer
FundingSource
The funding source used for funding transactions.
Attributes
debitEBTReEntryDetails
- DebitEBTReEntry
card
- Card
If type is CREDIT_DEBIT, this is required. This carries details about the card. accountType
- string, enum['EBT']
The type of account this funding source taps into. ebtDetails
- EBTDetails
entryDetails
- FundingSourceEntryDetails
If type is CREDIT_DEBIT, this is required. This carries details about how the funding source data was collected on the terminal. emvData
- EMVData
If type is CREDIT_DEBIT and its an EMV transaction, this is required. This carries any EMV tags in addition to card data. verificationData
- VerificationData
If type is CREDIT_DEBIT, this will carry any data needed to verify the card. customFundingSource
- CustomFundingSource
If type is CUSTOM_FUNDING_SOURCE, this is required. This carries details about the custom funding source. type
- string, enum['CHEQUE', 'CUSTOM_FUNDING_SOURCE', 'CREDIT_DEBIT', 'CASH'] [Required] The type of funding source (CASH, CREDIT_DEBIT).
FundingSourceEntryDetails
Attributes
customerPresenceStatus
- string, enum['PRESENT', 'MOTO', 'ECOMMERCE', 'ARU']
entryMode
- string, enum['KEYED', 'TRACK_DATA_FROM_MAGSTRIPE', 'CONTACTLESS_MAGSTRIPE', 'INTEGRATED_CIRCUIT_CARD', 'CONTACTLESS_INTEGRATED_CIRCUIT_CARD']
Hook
The object representing the webhook.
Attributes
applicationId
- string
ApplicationId e.g. urn:aid:c5aaffaf-ee8c-41bc-82fa-88882222ddde. eventTypes
- array [string]
List of events to subscribe to. deliveryUrl
- string
The Url at which to deliver the webhook event. secret
- string
Used for signing the webhook event. businessId
- string
The business whose events to subscribe to. updatedAt
- string
The time (in ISO-8601 format) at which the Hook was updated. E.g. 2014-09-11T23:14:44Z. createdAt
- string
The time (in ISO-8601 format) at which the Hook was created. E.g. 2014-09-11T23:14:44Z. id
- string
Inventory
Attributes
stockCount
- float
The actual physical count of the product the business has. availableCount
- float
The subset of the stockCount which is available for sale i.e. If an item is already sold, but not shipped, it is not available. reOrderLevel
- float
When a re-order is triggered, the stockCount should be brought back up to this value. reOrderPoint
- float
When the stockCount reach this value, inventory should be reordered. createdAt
- string
The time (in ISO-8601 format) at which the Inventory was created. E.g. 2014-09-11T23:14:44Z. storeId
- string
UUID version 1, 2, 3, or 4. All server generated values are version 4. updatedAt
- string
The time (in ISO-8601 format) at which the Inventory was updated. E.g. 2014-09-11T23:14:44Z.
JsonPatch
Attributes
Link
Attributes
rel
- string
href
- string
method
- string
Order
This is the base object for the orders resource. Orders resource represents a purchase order for items or services. This object captures all items, amounts and transactions related to an order. One important point to note upfront is that all the order-level amount fields could be positive or negative. That is because unlike an item which is always either purchased or returned, an order could be a mixed bag of purchased or returned items. So the amounts could be positive or negative.
Attributes
orderNumber
- string
Stores often use a human readable order number to hand out to customers. Such numbers could be passed here. statuses
- OrderStatuses
Represents various order related statuses (including the order's own status). This is optional input. If not provided while creating an order, the order will be in CREATED state. links
- array [Link]
This is a response only field. It will include HATEOS links to any related orders. transactions
- array [Transaction]
A list of transactions being performed to pay for this order. items
- array [OrderItem]
A list of items (or services) being purchased. discounts
- array [Discount]
Order level discounts. An order level discount will be negative if it is being given to the customer and positive if it is being returned. Note that discounts can also be applied at a per item level. Those are present inside the OrderItem object. fees
- array [Fee]
parentId
- string
When creating a return order, the original order's ID can be specified here. amounts
- OrderAmounts
[Required] A summary of all amounts represented in the items, discounts and transactions objects. customerUserId
- integer
This field can be provided by the caller. If provided by the caller, Poynt ensures that it is a valid customer. If not provided by the caller, Poynt tries to determine the customer itself. Poynt assigns a userId to every customer using a card (credit or debit) for a payment. The customer's userId will be returned in this field. If an order contains multiple transactions, each using a different card, Poynt will leave this field as blank. stayType
- string, enum['REGULAR_STAY', 'QUICK_STAY', 'NON_LODGING']
notes
- string
Any special notes from the customer or merchant about the order could be recorded here. updatedAt
- string
This is a response only field. The time (in ISO-8601 format) at which the order was updated. E.g. 2014-09-11T23:14:44Z. createdAt
- string
This is a response only field. The time (in ISO-8601 format) at which the order was created. E.g. 2014-09-11T23:14:44Z. context
- ClientContext
[Required] Contains context about the order. Source must be populated. All other fields are optional. id
- string
The id of the order created. If provided in the request, it will be used as the order ID. If not provided, id will be generated internally.
OrderAmounts
Summary of all amounts related to the order.
Attributes
currency
- string
[Required] Currency of the order. authorizedTotals
- TransactionAmounts
This is a response field. Sum of all transactions still in authorized state. voidedTotals
- TransactionAmounts
capturedTotals
- TransactionAmounts
This is a response field. Sum of all transactions that have been completed. refundedTotals
- TransactionAmounts
This is a response field. Sum of all transactions that have been refunded. savedTotals
- TransactionAmounts
This is a response field. Sum of all transactions that are still in saved state (not processed). netTotal
- integer
This is a response field. Sum of subTotal, discountTotal and taxTotal. Note that its a simple summation as those amounts already have the correct sign. discountTotal
- integer
[Required] Sum of all order and item level discounts. Negative amount for purchases, positive amount for returns. feeTotal
- integer
subTotal
- integer
[Required] Sum of all item amounts (excluding item level discounts and taxes). Positive amount for purchases and negative amount for returns. taxTotal
- integer
[Required] Sum of all item level taxes. Positive amount for purchases, negative amount for returns.
OrderItem
Details about the item being purchased. Here are a couple of point that might not be immediately obvious: (a) all discounts and taxes apply to the entire group of items, not just a single unit of item, (b) none of the amount fields inside OrderItem carry +/- sign because the sign is implied in the item status. E.g. discount would be -ive is item's status is ORDERED or FULFILLED and +ive if item's status is RETURNED.
Attributes
clientNotes
- string
Any special instructions related to this order item. fulfillmentInstruction
- string, enum['NONE', 'PICKUP_INSTORE', 'SHIP_TO']
Instructions on how this set of items will be fulfilled. Only applicable on items that are in ORDERED state. If the fulfillmentInstruction is SHIP_TO, you can note down the address in the clientNotes field as we don't model delivery address yet. serviceStartAt
- string
ISO 8601 format YYYY-MM-DDThh:mm:ssZ serviceEndAt
- string
ISO 8601 format YYYY-MM-DDThh:mm:ssZ taxExempted
- boolean
quantity
- float
[Required] Quantity purchased. Note this could be in decimals, e.g. 2.3 Kgs. unitPrice
- integer
[Required] Price for each unit. status
- string, enum['ORDERED', 'FULFILLED', 'RETURNED'] [Required] Status of the item.
id
- integer
Every item gets an ID unique within the order. If not passed from outside, the server simple assigns IDs in ascending order starting from 1. details
- string
Item details. tax
- integer
Total tax amount applied on this group of items (not just 1 unit). If not specified, but the taxes array is present the server will automatically sum up the amounts in taxes array and populate this. If not specified and taxes array is empty, this will default to 0. fee
- integer
discount
- integer
Total discount amount applied on this group of items (not just 1 unit). If not specified, but the discounts array is present the server will automatically sum up the amounts in discounts array and populate this. If not specified and discounts array is empty, this will default to 0. selectedVariants
- array [Variant]
fees
- array [Fee]
discounts
- array [Discount]
A break-down/details of the discount amount. Note that the discounts here in this array are for the entire group of items put together (not just 1 unit). taxes
- array [OrderItemTax]
A break-down/details of the tax amount. Note that the taxes here in this array are for the entire group of items put together (not just 1 unit). productId
- string
id of the product in the catalog. sku
- string
Sku of the item. createdAt
- string
The time (in ISO-8601 format) at which the order item was created. E.g. 2014-09-11T23:14:44Z. updatedAt
- string
The time (in ISO-8601 format) at which the order item was updated. E.g. 2014-09-11T23:14:44Z. unitOfMeasure
- string, enum['EACH', 'HOURS', 'DAYS', 'SECONDS', 'CRATE_OF_12', 'SIX_PACH', 'GALLON', 'LITRE', 'INCH', 'FOOT', 'MILLIMETER', 'CENTIMETER', 'METER', 'SQUARE_METER', 'CUBIC_METER', 'GRAM', 'KILOGRAM', 'POUND', 'ANNUAL', 'DEGREE_CELCIUS', 'DEGREE_FARENHEIT'] [Required] Unit of measure for the quantity.
name
- string
[Required] Name of the item.
OrderItemTax
Attributes
amount
- integer
type
- string
id
- string
OrderStatuses
Order status and item fulfillment status.
Attributes
status
- string, enum['OPENED', 'CANCELLED', 'COMPLETED']
This is an input/output field. An order status is used for tracking which orders are being actively monitored vs which ones are archived. An order marked as COMPLETED or CANCELED is closed an hence is not being actively monitored by the merchant. A merchant focused on OPENED orders. transactionStatusSummary
- string, enum['NONE', 'EXTERNALLY_PROCESSED', 'PENDING', 'COMPLETED', 'REFUNDED', 'CANCELED']
This is a response only field. Show a summary view of all the transactions' statuses put together. NONE implies no transaction was ever processed for this order (note: cash is counted as processed). EXTERNALLY_PROCESSED implies that the the creator of the order instructed that the transactions was processed outside of Poynt. COMPLETED implies that something has been processed, and net funds received >= order's net total. CANCELED implies that something has been processed, but everything is voided at this point. REFUNDED implies that something has been processed, but everything is refunded at this point. PENDING implies that something has been processed, but net funds received < order's net total. fulfillmentStatus
- string, enum['NONE', 'PARTIAL', 'FULFILLED']
This is a response only field. Show a summary view of all the items' fulfillment statuses put together. If none of the items have been fulfilled, this status will be NONE. If all items have been fulfilled, this status will be FULFILLED. If some but not all items have been fulfilled, this will be PARTIAL.
Phone
Attributes
status
- string, enum['ADDED', 'CONFIRMED']
areaCode
- string
updatedAt
- string
ISO 8601 format YYYY-MM-DDThh:mm:ssZ ituCountryCode
- string
localPhoneNumber
- string
createdAt
- string
ISO 8601 format YYYY-MM-DDThh:mm:ssZ extensionNumber
- string
id
- integer
type
- string, enum['HOME', 'WORK', 'BUSINESS', 'MOBILE', 'FAX', 'PAGER', 'RECEIPT', 'OTHER']
ProcessorResponse
Processor response fields.
Attributes
cvActualResult
- string
statusCode
- string
Will be 1 if status is Successful. If status is Failure, it will be whatever statusCode came from the acquirer. status
- string, enum['Successful', 'Failure']
Possible values are Successful or Failure. remainingBalance
- integer
The amount that is left on the prepaid card after an authorization. retrievalRefNum
- string
cardToken
- string
emvTags
- object
A name/value pair to list down all tags returned by the processor including the ones normalized in some of the other fields in ProcessorResponse. Both name and value are Strings. providerVerification
- ProviderVerification
Object that carries provider verification related fields. batchId
- string
The ID of the settlement batch that this transaction is assigned to. cvResult
- string, enum['MATCH', 'NO_MATCH', 'NOT_PROCESSED', 'NO_CODE_PRESENT', 'SHOULD_HAVE_BEEN_PRESENT', 'ISSUER_NOT_CERTIFIED', 'INVALID', 'NO_RESPONSE', 'NOT_APPLICABLE']
The card verification results. avsResult
- AVSResult
The address verification results. transactionId
- string
The transactionID that came back from the acquirer. processor
- string, enum['CHASE_PAYMENTECH', 'REDE', 'EVO', 'FIRST_DATA', 'GLOBAL_PAYMENTS', 'HEARTLAND_PAYMENT_SYSTEM', 'ELAVON', 'MERCURY', 'MONERIS', 'PAYPAL', 'STRIPE', 'TSYS', 'VANTIV', 'WORLDPAY', 'EPX', 'BRIDGEPAY', 'CREDITCALL', 'NA_BANCARD', 'MOCK']
acquirer
- string, enum['CHASE_PAYMENTECH', 'REDE', 'EVO', 'FIRST_DATA', 'GLOBAL_PAYMENTS', 'HEARTLAND_PAYMENT_SYSTEM', 'ELAVON', 'MERCURY', 'MONERIS', 'PAYPAL', 'STRIPE', 'TSYS', 'VANTIV', 'WORLDPAY', 'EPX', 'BRIDGEPAY', 'CREDITCALL', 'NA_BANCARD', 'MOCK']
approvedAmount
- integer
The amount that the authorization was approved for. This could be different from the transactionAmount requested. statusMessage
- string
Will be whatever message came back from the acquirer. approvalCode
- string
The approval code that came back from the acquirer (usually its 6 alpha-numeric characters).
Product
Attributes
description
- string
status
- string, enum['ACTIVE', 'RETIRED']
tags
- string
Custom tag for the product unitOfMeasure
- string, enum['EACH', 'HOURS', 'DAYS', 'SECONDS', 'CRATE_OF_12', 'SIX_PACH', 'GALLON', 'LITRE', 'INCH', 'FOOT', 'MILLIMETER', 'CENTIMETER', 'METER', 'SQUARE_METER', 'CUBIC_METER', 'GRAM', 'KILOGRAM', 'POUND', 'ANNUAL', 'DEGREE_CELCIUS', 'DEGREE_FARENHEIT']
taxes
- array [Tax]
bundledProducts
- array [ProductRelation]
Used to define a product bundle. If this is a bundle, 'type' should be set to 'BUNDLE' relatedProducts
- array [ProductRelation]
Can be used to optionally store related products which can be presented to the customer as an upsell. addonProducts
- array [ProductRelation]
Add-on products, e.g. a case for a phone. possibleVariations
- array [Variation]
Used to store all the possible product attributes and their values, e.g. size - [ 'small', 'medium', 'large'] inventory
- array [Inventory]
Can be used to store inventory for products with no variants (or product bundles). If a product has variants, the inventory is nested inside the variant object templateOverrides
- array [string] deprecated
ean
- string
European Article Number (13 digits) upc
- string
Universal Product Code (12 digits) isbn
- string
International Standard Book Number plu
- string
Price look-up codes asin
- string
Amazon Standard Identification Number, refer to https://en.wikipedia.org/wiki/Amazon_Standard_Identification_Number specification
- string
brand
- string
releaseDate
- string
ISO 8601 format YYYY-MM-DDThh:mm:ssZ msrp
- CurrencyAmount
avgUnitCost
- CurrencyAmount
imageUrl
- array [string]
selectableVariants
- array [Variant]
Used for catalogs suitable for a QSR merchant to define modifiers for the product. Default option for Poynt Register and Catalog apps. sku
- string
Stock Keeping Unit shortCode
- string
price
- CurrencyAmount
businessId
- string
UUID version 1, 2, 3, or 4. All server generated values are version 4. updatedAt
- string
ISO 8601 format YYYY-MM-DDThh:mm:ssZ createdAt
- string
ISO 8601 format YYYY-MM-DDThh:mm:ssZ manufacturer
- string
publisher
- string
studio
- string
designer
- string
author
- string
artist
- string
productTemplateId
- string
deprecated mpn
- string
Manufacturer Part Number styleNumber
- string
modelNumber
- string
name
- string
id
- string
type
- string, enum['SIMPLE', 'BUNDLE']
variants
- array [Variant]
Used for catalogs suitable for a retail merchant to define available variants for the product (based on the attributes defined in 'possibleVariations')
ProductRelation
Attributes
count
- integer
relatedProductSku
- array [string]
relatedProductId
- string
price
- CurrencyAmount
type
- string, enum['BUNDLE', 'RELATED', 'ADDON']
ProductSummary
Attributes
shortCode
- string
price
- CurrencyAmount
businessId
- string
UUID version 1, 2, 3, or 4. All server generated values are version 4. name
- string
id
- string
ProductVariation
Attributes
attribute
- string
value
- string
Store
This is the base object for the businesses resource. Businesses resource represents a merchant business.
Attributes
gatewayStoreId
- string
ID assigned to the store by the gateway (some gateways assign their own IDs). This field will typically not be available when the business is initially created in the Poynt system. Once that information is passed to the gateway, they will provide their ID. storeTerminalIds
- array [StoreTerminalId]
A list of terminal IDs that are allocated at this store. currency
- string
The primary transaction currency for this merchant. latitude
- float
Latitude of the terminal. longitude
- float
Longitude of the terminal. status
- string, enum['ACTIVE', 'DISABLED', 'REMOVED']
The status of the store. processorData
- object
catalogId
- string
The default product catalog that devices at the store should use. timezone
- string
[Required] The timezone of the store. processor
- string, enum['CHASE_PAYMENTECH', 'REDE', 'EVO', 'FIRST_DATA', 'GLOBAL_PAYMENTS', 'HEARTLAND_PAYMENT_SYSTEM', 'ELAVON', 'MERCURY', 'MONERIS', 'PAYPAL', 'STRIPE', 'TSYS', 'VANTIV', 'WORLDPAY', 'EPX', 'BRIDGEPAY', 'CREDITCALL', 'NA_BANCARD', 'MOCK']
The processor for this merchant. If this field is left blank it is assumed that the processor is the acquirer itself or CreditCall that happens to be our primary gateway. acquirer
- string, enum['CHASE_PAYMENTECH', 'REDE', 'EVO', 'FIRST_DATA', 'GLOBAL_PAYMENTS', 'HEARTLAND_PAYMENT_SYSTEM', 'ELAVON', 'MERCURY', 'MONERIS', 'PAYPAL', 'STRIPE', 'TSYS', 'VANTIV', 'WORLDPAY', 'EPX', 'BRIDGEPAY', 'CREDITCALL', 'NA_BANCARD', 'MOCK']
The acquirer for this merchant. storeDevices
- array [StoreDevice]
See storeTerminalIds. externalStoreId
- string
[Required] MID (merchantId) assigned to the store by the acquirer. phone
- Phone
[Required] The store's phone. This may or may not be different from business phone. address
- Address
[Required] The store's address. This may or may not be different from business address. id
- string
The id of the store. This id is generated internally during create business. attributes
- object
A name/value pair list that could be persisted and later retreived. displayName
- string
[Required] The store name (used in various displays). It is recommended to pick a different name for each store in the business.
StoreDevice
This object represents devices in store. The most common store device represented in the Poynt system is a terminal. In the Poynt system a business can have 0 or more stores and each store can have 0 or more store devices. Note that a terminal when initially created will only have an externalTerminalId (aka TID assigned by the acquirer). It is only after the Poynt Smart Terminal arrives at the store and is activated that the deviceId is associated with the externalTerminalId to complete the terminal profile.
Attributes
lastSeenAt
- string
The time (in ISO-8601 format) at which the storeDevice last had any activity. E.g. 2014-09-11T23:14:44Z. kekDetails
- array [DeviceKekData]
businessAgreements
- array [Entry]
Business agreement type to business agreement object map. publicKeyVerification
- PublicKeyVerificationData
serialNumber
- string
Required during activation. A manufacturer identifier for the terminal device. This is not available at the time of business onboarding as at that point a physical device has not been picked. It is assigned during terminal activation. status
- string, enum['CREATED', 'ACTIVATED', 'DEACTIVATED', 'REMOVED']
Status of device. processorData
- object
catalogId
- string
The store level product catalog can be overriden at the terminal level using this field. storeId
- string
UUID version 1, 2, 3, or 4. All server generated values are version 4. deviceId
- string
Required during activation. A Poynt identifier for the terminal device. This is not available at the time of business onboarding as at that point a physical device has not been picked. It is assigned during terminal activation. externalTerminalId
- string
[Required] The TID (terminal ID) assigned to this terminal by the acquirer. updatedAt
- string
The time (in ISO-8601 format) at which the store device was updated. E.g. 2014-09-11T23:14:44Z. createdAt
- string
The time (in ISO-8601 format) at which the store device was created. E.g. 2014-09-11T23:14:44Z. name
- string
Name of the terminal assigned by the business user. It is recommended to use a different name for each terminal. type
- string, enum['TERMINAL', 'WIFI_SENSOR'] [Required] Type of device.
publicKey
- string
PublicKey to verify all future JWT tokens coming from the terminal.
Tax
Attributes
description
- string
rate
- double
amount
- integer
businessId
- string
UUID version 1, 2, 3, or 4. All server generated values are version 4. updatedAt
- string
ISO 8601 format YYYY-MM-DDThh:mm:ssZ createdAt
- string
ISO 8601 format YYYY-MM-DDThh:mm:ssZ name
- string
id
- string
type
- string
TokenResponse
Attributes
tokenType
- string, enum['BEARER']
expiresIn
- integer
scope
- string
refreshToken
- string
accessToken
- string
Transaction
This is the base object for the transactions resource. Transactions resource represents a financial transaction. It can be used to save the transaction in the Poynt system as well as initiate interaction with the acquirer to move funds.
Attributes
action
- string, enum['AUTHORIZE', 'CAPTURE', 'OFFLINE_AUTHORIZE', 'REFUND', 'SALE', 'VERIFY'] [Required] If funding source is CASH, only SALE and REFUND are the available options. If funding source is CREDIT_DEBIT, AUTHORIZE, SALE or REFUND, VERIFY are the possible request options (VERIFY is supported only for Elavon and TSYS processors). Note that even for VOID, the action is set to REFUND. OFFLINE_AUTHORIZE can only be used in a Record Transaction API to record an authorization that already happened offline.
reason
- TransactionReason
status
- string, enum['CREATED', 'SAVED', 'AUTHORIZED', 'PARTIALLY_CAPTURED', 'CAPTURED', 'DECLINED', 'PARTIALLY_CAPTURED_AND_PARTIALLY_REFUNDED', 'PARTIALLY_REFUNDED', 'REFUNDED', 'VOIDED']
If funding source is CASH, only CAPTURED and REFUNDED are the possible options. The SAVE feature is not applicable to CASH. links
- array [Link]
This is a response field. Hateos link pointing to all immediate parent and child transactions. E.g. a CAPTURE transaction that has been REFUNDED would have 2 links: one pointing to its parent AUTHORIZE transaction and the other to its child REFUND transaction. fundingSource
- FundingSource
[Required] The funding source used for funding this transaction. parentId
- string
In the request, if action = refund, parentId could carry the id of the transaction being refunded. Note that parentId could be empty for non-referenced refund. In the response, this will contain the parent transaction's Id (e.g. capture is the parent of refund and authorization is the parent of capture. amounts
- TransactionAmounts
[Required] All amounts requested for this transaction. references
- array [TransactionReference]
References to orders/invoices that this transaction is for. customerUserId
- integer
A Poynt generated customer id that is returned in the response. This id is only assigned only to a customer performing a card transaction. stayType
- string, enum['REGULAR_STAY', 'QUICK_STAY', 'NON_LODGING']
receiptPhone
- Phone
Phone collected from the customer to SMS receipt. receiptEmailAddress
- string
Email address collected from the customer. transactionNumber
- string
A transaction number generated by the client and passed to the server. This could be anything; the server will just store it. notes
- string
Any special notes from the customer or merchant about the transaction could be recorded here. updatedAt
- string
This is a response field. The server time (in ISO-8601 format) at which this transaction was last updated. E.g. 2014-09-11T23:14:44Z. createdAt
- string
This is a response field. The server time (in ISO-8601 format) at which this transaction was initially created. E.g. 2014-09-11T23:14:44Z. poyntLoyalty
- PoyntLoyalty
processorResponse
- ProcessorResponse
This is a response field. Some important response elements received from the processor. approvalCode
- string
An approval code received over the phone (in case of terminal going offline) can be passed here as part of a SALE transaction. This process in the industry is often referred to as forced post or forced sale. context
- ClientContext
[Required] Contains context about the transaction. TransmissionAtLocal must be provided. All other fields are optional. id
- string
The id of the transaction created. If provided in the request, it will be used as the transaction ID. If not provided, id will be generated internally. signature
- array [byte]
Signature collected from the customer.
TransactionAmounts
All amount related fields.
Attributes
currency
- string
[Required] Currency following the ISO-4217 format (http://en.wikipedia.org/wiki/ISO_4217). transactionAmount
- integer
[Required] The total amount to be charged on the tender. This equals orderAmount + tipAmount + cashbackAmount. orderAmount
- integer
[Required] The portion of transactionAmount that went towards the item/service being purchased. tipAmount
- integer
The portion of transactionAmount that went towards tip. Defaults to 0 if not provided. cashbackAmount
- integer
The portion of transactionAmount that will be returned as cashback (mainly applicable for cash or debit-card tenders). Defaults to 0 if not provided.
TransactionReference
Reference to a document (e.g. order or invoice) that this transaction is for.
Attributes
customType
- string
If type is set to CUSTOM, this must be populated. This is used to provide the name of the document being referenced. id
- string
The ID of the document. type
- string, enum['POYNT_ORDER', 'POYNT_STAY', 'CUSTOM']
The type of document. If it refers to an order maintained by Poynt, this should be set to POYNT_ORDER.
UserCredential
Attributes
publicCredentialValue
- string
id
- integer
privateCredentialValue
- string
privateCredentialSalt
- string
publicCredentialType
- string, enum['USERNAME', 'EMAIL', 'JWT', 'PAYPAL']
Variant
Attributes
price
- CurrencyAmount
defaultVariant
- boolean
variations
- array [ProductVariation]
Used to define values for attributes for a specific retail product variant. selectableVariations
- array [SelectableVariation]
Used to define attributes for a specific QSR product. inventory
- array [Inventory]
sku
- string
createdAt
- string
ISO 8601 format YYYY-MM-DDThh:mm:ssZ updatedAt
- string
ISO 8601 format YYYY-MM-DDThh:mm:ssZ
Variation
Attributes
attribute
- string
values
- array [string]
VerificationData
All cardholder verification data.
Attributes
additionalIdType
- string, enum['DRIVERS_LICENCE', 'EMAIL', 'PASSPORT', 'PHONE', 'NATIONAL_ID_CARD']
Type of additional ID collected. additionalIdRefNumber
- string
The additional ID collected. cvSkipReason
- string, enum['NOT_PRESENT', 'NOT_AVAILABLE', 'BYPASSED', 'ILLEGIBLE']
CVV skipped because of this reason. cardHolderBillingAddress
- Address
Address for AVS. cvData
- string
CVV information typically at the back of the card. pin
- string
The debit pin block. keySerialNumber
- string
The acquirer's KeySerialNumber (KSN) corresponding to the pin-block.


