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
El identificador único asignado por el sistema/base de datos fuente. Si detectamos un registro con el mismo externalId, se actualizará; de lo contrario, se añadirá.
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
La persona principal responsable del negocio. No es necesario si accessType = 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
El nivel de acceso que el sitio está solicitando. Utiliza api_only si no deseas enviar el correo de bienvenida al contacto principal.
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
			
{
  "externalId": "12345678",
  "name": "Sample Company",
  "merchantId": "123544633452",
  "agency": {
    "externalId": "65123125",
    "name": "Sample Agency"
  },
  "location": {
    "addressLine1": "123 Main Street",
    "addressLine2": "Suite 123",
    "city": "Naples",
    "stateCode": "FL",
    "zipCode": "34102",
    "phone": "239-123-1234",
    "website": "https://samplecompany.com"
  },
  "primaryContact": {
    "firstName": "Thomas",
    "lastName": "Smith",
    "email": "tsmith@samplecompany.com",
    "mobilePhone": "239-987-6543"
  },
  "paymentTypes": {
    "paymentCard": {
      "active": true,
      "gateway": {
        "code": "gatewaycode",
        "credentials": {
          "key": "value",
          "key2": "value2"
        }
      }
    },
    "ach": {
      "active": true,
      "gateway": {
        "code": "gatewaycode",
        "credentials": {
          "key": "value",
          "key2": "value2"
        }
      }
    }
  },
  "branding": {
    "logoUrl": "https://samplecompany.com/images/logo.png",
    "logoBase64": "",
    "color": "#336699"
  },
  "accessType": "basic",
  "webhook": {
    "active": true,
    "url": "https://mysoftware.com/webhook"
  },
  "deleted": false
}


		
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"
  ]
}