Link Search Menu Expand Document

Altering a business

Returns an OK code and a JSON for the user. A sample is shown below:

{
    "result": {
        "code": 1,
        "status": "ok"
    },
    "results": {
        "business": {
            "id": 1383,
            "chain_id": 1743,
            "name": "ACME Inc",
            "address_1": "Herengracht 504",
            "address_2": "Foo",
            "address_3": "Bar",
            "towncity": "Amsterdam",
            "region": "Noord Holland",
            "postalcode": "1017 CB",
            "countrycode": "NL",
            "latitude": "52.37021570",
            "longitude": "1.89516789",
            "owner_code": "10001",
            "email_address": "ops@spaaza.com",
            "website_url": "http://www.spaaza.com",
            "business_image_url": "https://media.licdn.com/dms/image/C4D0BAQEN6wx-nP_Crg/company-logo_400_400/0?e=1578528000&v=beta&t=1qKTWg0qbIJMydHHG02YPhD8N4LONyW5Rp06wn5DvN0",
            "business_review_url" : "https://g.page/spaaza/review"
            "type": "business"
        },
        "result_type": "alter-business"
    }
}

Overview

  • Call name: alter-business
  • Endpoint URL: https://api0.spaaza.com/internal/alter-business
  • Request methods: PUT
  • Request Content-Type: multipart/form-data or application/x-www-form-urlencoded
  • Response Content-Type: application/json
  • Auth required: yes
  • X-MyPrice-App-Hostname header requirement: mandatory when using privileged authentication

Introduction

In Spaaza terminology, a “business” is a branch of a retailer (a “chain”). This API call updates an existing business.

HTTP Parameters

The following HTTP parameters can be passed to the API:

Parameter Description
business_id (integer) The ID of the business whose details are to be altered. This parameter can be used to identify the business.
name (string) The name of the business.
address_1 (string) The first line of the business address.
address_2 (string) The second line of the business address.
address_3 (string) The third line of the business address.
address_towncity (string) The postal city of the business.
region (sting) The region or country of the business.
countrycode (string) The ISO ALPHA-2 country code of the business.
postalcode (string) The postalcode of the business.
latitude (float) The latitude of the business in decimal degrees.
longitude (float) The longitude of the business in decimal degrees.
business_image_url (string) The url link to the businesses image/logo.
business_review_url (string) The url link to the review business page.

Permissions and Authentication

Admin authentication: The performing user needs to be logged in and have write access to the entity (business or chain) to which the user is connected. –>