Agregar/Actualizar Sitio

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).

Punto Final

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

POST
{base_url}/api/v4/site/addUpdate

Solicitud
Campo
Tipo
Descripción
externalId
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
El nombre del sitio/negocio.
merchantId
String
El ID del comerciante asignado al negocio por el banco adquirente/procesador.
agency
Agency
Una referencia al registro de la agencia.
location
La dirección comercial de este sitio/negocio.
primaryContact
The main person responsible for the business. Not required if `access_type = api_only`.
siteEnterprise
Una referencia al registro de la empresa del sitio.
siteGroup
Una referencia al registro del grupo del sitio.
branding
La marca única del negocio, incluyendo el logotipo y el color principal.
accessType
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`
webhook
Configurar webhooks para recibir actualizaciones en tiempo real cuando se actualizan datos relacionados con este sitio.
paymentTypes
Los métodos de pago disponibles para aceptar pagos de los clientes. Se requiere al menos un método de pago.
deleted
Boolean
Esta bandera representa si el registro ha sido eliminado y ya no está disponible para ser utilizado.
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"
  }
}


		
Respuesta
Campo
Tipo
Descripción
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"
  ]
}