Add/Update Site

A site must be created prior to making any of the standard API calls. A unique site should be created for each unique Merchant ID (MID).

Endpoint

The following endpoint can be used to add or update sites. You must replace the {base_url} variable.

POST
{base_url}/api/v3.1/site/addUpdate

Request
Field
Type
Description
external_id
String
The unique id assigned by the source system/database. If we detect a record with the same external_id, it will be updated, otherwise it will be added.
name
String
The name of the site/business.
merchant_id
String
The merchant id assigned to the business by the acquiring bank/processor.
agency
Agency
A reference to the agency record.
location
The business address of this site/business.
primary_contact
The main person responsible for the business. Not required if access_type = api_only.
site_enterprise
A reference to the site enterprise record.
site_group
A reference to the site group record.
branding
The unique branding of the business including the logo and primary color.
access_type
String
The level of access the site is requesting. Use api_only if you do not wish to send the welcome email to the primary contact.
Default = basic | One of api_only, basic, pro
active
Boolean
This flag represents whether the site record is active and available to be used or not.
Default = true
webhook
Setup webhooks to receive real-time updates when data related to this site is updated.
payment_types
The payment methods available to accept payments from customers. At least one payment method is required.
Sample Request
			
{
  "external_id": "12345678",
  "name": "Sample Company",
  "merchant_id": "123544633452",
  "agency": {
    "external_id": "65123125",
    "name": "Sample Agency"
  },
  "location": {
    "address_line1": "123 Main Street",
    "address_line2": "Suite 123",
    "city": "Naples",
    "state_code": "FL",
    "zip_code": "34102",
    "phone": "239-123-1234",
    "website": "https://samplecompany.com"
  },
  "primary_contact": {
    "first_name": "Thomas",
    "last_name": "Smith",
    "email": "tsmith@samplecompany.com",
    "mobile_phone": "239-987-6543"
  },
  "payment_types": {
    "payment_card": {
      "active": true,
      "gateway": {
        "code": "gatewaycode",
        "credentials": {
          "key": "value",
          "key_2": "value2"
        }
      }
    },
    "ach": {
      "active": true,
      "gateway": {
        "code": "gatewaycode",
        "credentials": {
          "key": "value",
          "key_2": "value2"
        }
      }
    }
  },
  "branding": {
    "logo_url": "https://samplecompany.com/images/logo.png",
    "logo_base64": "",
    "color": "#336699"
  },
  "access_type": "basic",
  "active": true,
  "webhook": {
    "active": true,
    "url": "https://mysoftware.com/webhook"
  }
}


		
Response
Field
Type
Description
success
Boolean
Whether the record was added or updated successfully.
action
String
Informs whether the record was added or updated. Will only be returned if success is true.
One of added, updated
_id
String
The auto generated id assigned to the record.
errors
String [ ]
A list of errors. Will only be returned if success is false.
Sample Response (Successful)
			
{
  "success": true,
  "action": "added",
  "_id": "60f720d248f143332af022e0"
}


		
Sample Response (Failed)
			
{
  "success": false,
  "errors": [
    "invalid field2",
    "missing field_name"
  ]
}