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/v3.1/site/addUpdate

Solicitud
Campo
Tipo
Descripción
external_id
String
El identificador único asignado por el sistema/base de datos fuente. Si detectamos un registro con el mismo external_id, se actualizará; de lo contrario, se añadirá.
name
String
El nombre del sitio/negocio.
merchant_id
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.
primary_contact
La persona principal responsable del negocio. No es necesario si access_type = api_only.
site_enterprise
Una referencia al registro de la empresa del sitio.
site_group
Una referencia al registro del grupo del sitio.
branding
La marca única del negocio, incluyendo el logotipo y el color principal.
access_type
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
active
Boolean
Esta bandera representa si el registro del sitio está activo y disponible para ser utilizado o no.
Default = true
webhook
Configurar webhooks para recibir actualizaciones en tiempo real cuando se actualizan datos relacionados con este sitio.
payment_types
Los métodos de pago disponibles para aceptar pagos de los clientes. Se requiere al menos un método de pago.
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"
  ]
}