Businesses

Update a Business

Edit information of the business with the given id. Current user needs UserRole ADMIN, ACCOUNT_MANAGER or BUSINESS_MANAGER.

patch/businesses/{id}

Request

  • Base URL
    https://workflows.promorepublic.com/webhook/2637089f-b543-45d0-a83e-2334aada4ead/listings/sandbox/api
  • Auth
    HTTP bearer

Path parameters

idstring required

The PromoRepublic unique id for the business

Request body

idinteger

The PromoRepublic unique id for the business

namestring

The business's name

type'SMB' | 'ENTERPRISE'

Business type. One of SMB or ENTERPRISE

streetAndNostring

Address of the business

addressLine2string

An address extra: e.g. building, floor...

provincestring

Province. Only send when not blank

zipstring

Zipcode of the business

citystring

City of the business

identifierstring

The business identifier based on your internal identification system

country'AF' | 'AX' | 'AL' | 'DZ' | 'AS' | 'AD' | 'AO' | 'AI' | 'AQ' | 'AG' | 'AR' | 'AM' | 'AW' | 'AU' | 'AT' | 'AZ' | 'BS' | 'BH' | 'BD' | 'BB' | 'BY' | 'BE' | 'BZ' | 'BJ' | 'BM' | 'BT' | 'BO' | 'BQ' | 'BA' | 'BW' | 'BV' | 'BR' | 'IO' | 'BN' | 'BG' | 'BF' | 'BI' | 'KH' | 'CM' | 'CA' | 'CV' | 'KY' | 'CF' | 'TD' | 'CL' | 'CN' | 'CX' | 'CC' | 'CO' | 'KM' | 'CG' | 'CD' | 'CK' | 'CR' | 'CI' | 'HR' | 'CU' | 'CW' | 'CY' | 'CZ' | 'DK' | 'DJ' | 'DM' | 'DO' | 'EC' | 'EG' | 'SV' | 'GQ' | 'ER' | 'EE' | 'ET' | 'FK' | 'FO' | 'FJ' | 'FI' | 'FR' | 'GF' | 'PF' | 'TF' | 'GA' | 'GM' | 'GE' | 'DE' | 'GH' | 'GI' | 'GR' | 'GL' | 'GD' | 'GP' | 'GU' | 'GT' | 'GG' | 'GN' | 'GW' | 'GY' | 'HT' | 'HM' | 'VA' | 'HN' | 'HK' | 'HU' | 'IS' | 'IN' | 'ID' | 'IR' | 'IQ' | 'IE' | 'IM' | 'IL' | 'IT' | 'JM' | 'JP' | 'JE' | 'JO' | 'KZ' | 'KE' | 'KI' | 'KP' | 'KR' | 'XK' | 'KW' | 'KG' | 'LA' | 'LV' | 'LB' | 'LS' | 'LR' | 'LY' | 'LI' | 'LT' | 'LU' | 'MO' | 'MK' | 'MG' | 'MW' | 'MY' | 'MV' | 'ML' | 'MT' | 'MH' | 'MQ' | 'MR' | 'MU' | 'YT' | 'MX' | 'FM' | 'MD' | 'MC' | 'MN' | 'ME' | 'MS' | 'MA' | 'MZ' | 'MM' | 'NA' | 'NR' | 'NP' | 'NL' | 'NC' | 'NZ' | 'NI' | 'NE' | 'NG' | 'NU' | 'NF' | 'MP' | 'NO' | 'OM' | 'PK' | 'PW' | 'PS' | 'PA' | 'PG' | 'PY' | 'PE' | 'PH' | 'PN' | 'PL' | 'PT' | 'PR' | 'QA' | 'RE' | 'RO' | 'RU' | 'RW' | 'BL' | 'SH' | 'KN' | 'LC' | 'MF' | 'PM' | 'VC' | 'WS' | 'SM' | 'ST' | 'SA' | 'SN' | 'RS' | 'SC' | 'SL' | 'SG' | 'SX' | 'SK' | 'SI' | 'SB' | 'SO' | 'ZA' | 'GS' | 'SS' | 'ES' | 'LK' | 'SD' | 'SR' | 'SJ' | 'SZ' | 'SE' | 'CH' | 'SY' | 'TW' | 'TJ' | 'TZ' | 'TH' | 'TL' | 'TG' | 'TK' | 'TO' | 'TT' | 'TN' | 'TR' | 'TM' | 'TC' | 'TV' | 'UG' | 'UA' | 'AE' | 'UK' | 'US' | 'UM' | 'UY' | 'UZ' | 'VU' | 'VE' | 'VN' | 'VG' | 'VI' | 'WF' | 'EH' | 'YE' | 'ZM' | 'ZW'

Country of the business

phonestring

Business's phone number

preSyncboolean

Pre sync

translationLocalesobject[]

Locales the business's locations should be translated into. Requires the LOCATION_TRANSLATION feature on the business's product plan.

dateCreatedstring date-time

The date and time the business was created in PromoRepublic database

status'CREATED' | 'NOT_CONFIRMED' | 'ACTIVE' | 'DELETED'

Business's status

defaultPriceinteger

Business default price in cent

defaultOriginalPriceinteger

Default Original Price in cent

defaultPriceSetupinteger

Business default setup price in cent

customFieldsstring

Custom fields allow for additional information to be added at the location level. All locations within the business will have the same list of custom fields.

dateExpirationstring date-time

The date the business's contract expires

businessSyncableboolean

True if the business is allowed to start a sync. Only relevant for Businesses with more than 10 locations.

numOfLocationsinteger

Number of active locations

effectiveDatestring date-time

Date when the business automatically changes its product plan to the new product plan (defined by nextProductPlanId)

nextProductPlanIdinteger

ID of the next product plan applied for the business on the defined effectiveDate

priceRetailinteger

Retail price

contractDurationinteger

Contract duration of the chosen product plan in months

defaultPriceMininteger
defaultCurrencystring

Example request

{
  "type": "[SMB, ENTERPRISE]",
  "addressLine2": "building, floor...",
  "productPlan": {
    "countryPrices": [
      {
        "marketDevelopmentFunds": 99
      }
    ]
  },
  "countryPrices": [
    {
      "marketDevelopmentFunds": 99
    }
  ]
}

Response

Successfully edited Business

status'SUCCESS' | 'PENDING' | 'QUOTA_LIMIT_EXCEED' | 'NOT_AUTHORIZED' | 'FORBIDDEN' | 'BAD_ACCESS_TOKEN' | 'BAD_PRIVATE_KEY' | 'BAD_PUBLIC_KEY' | 'MISSING_PARAMETER' | 'INVALID_PARAMETER' | 'WRONG_PARAMETER_TYPE' | 'CONFLICT' | 'RESOURCE_LOCKED' | 'SERVER_ERROR' | 'ERROR' | 'NOT_FOUND' | 'BAD_REQUEST' | 'USER_ERROR' | 'PARTIAL_ERROR' | 'SERVICE_TEMPORARILY_UNAVAILABLE' required
messagestring

(optional) Holds further information about the response

warningsstring[]

(optional) Holds further warnings

Example response

{
  "response": {
    "business": {
      "type": "[SMB, ENTERPRISE]",
      "addressLine2": "building, floor...",
      "productPlan": {
        "countryPrices": [
          {
            "marketDevelopmentFunds": 99
          }
        ]
      },
      "countryPrices": [
        {
          "marketDevelopmentFunds": 99
        }
      ]
    }
  }
}

Changes

No recorded changes to this operation across all 1 revision of this API.