Update Location

Edits a location in the database

Headers
  • Authorization
    Type: string
    required

    Bearer token for admin authorization, who is making a call on behalf of the customer. Send the API key in the following format: "Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE".

  • Accept
    Type: string
    required

    Advertises which content types the client is able to understand

  • Content-Type
    Type: string
    required

    Set this header to application/json.

Body
application/json
  • enable_weekly_redemption_report
    Type: boolean

    Enables sharing the weekly redemption report to the location email (applicable only for the franchisee model)

  • location
    Type: object
  • location_id
    Type: integer

    Unique of a particular location. Either location_id or store_number should be provided. If both are provided, store_number will be given priority.

  • store_number
    Type: string

    Unique store number provided by the business. Either location_id or store_number should be provided. If both are provided, store_number will be given priority.

Responses
  • application/json
  • application/json
  • application/json
  • application/json
Request Example for patch/api2/dashboard/locations
curl https://SERVER_NAME_GOES_HERE.punchh.com/api2/dashboard/locations \
  --request PATCH \
  --header 'Authorization: Bearer BUSINESS_ADMIN_KEY_GOES_HERE' \
  --header 'Accept: application/json' \
  --header 'Content-Type: application/json' \
  --data '{
  "location_id": 306248,
  "store_number": "ABCDXYZ",
  "location": {
    "address": "ADDRESS_GOES_HERE",
    "city": "Mountain View",
    "country": "United States",
    "external_store_id": "46ede9b5-287c-4ac5-84f4-86cb0927c96d",
    "latitude": 37.406658,
    "longitude": -122.109061,
    "name": "Headquarter7",
    "phone_number": "1111111111",
    "location_groups": [
      {
        "location_group_id": "2051"
      },
      {
        "location_group_id": "2052"
      },
      {
        "location_group_id": "2053"
      }
    ],
    "loc_email": "test@example.com",
    "post_code": "94040",
    "state": "California",
    "store_tags": "WiFi,DriveThru,GiftCard",
    "location_extra_attributes": {
      "brand": "Punchh",
      "online_order_url": "https://example.com",
      "alternate_store_number": "UK@8907",
      "enable_multiple_redemptions": true,
      "additional_url": [
        {
          "label": "reservation",
          "url": "https://example1.com"
        }
      ],
      "store_times": [
        {
          "day": "Mon",
          "start_time": "5:30 AM",
          "end_time": "7:00 PM"
        },
        {
          "day": "Tue",
          "start_time": "5:30 AM",
          "end_time": "8:00 PM"
        },
        {
          "day": "Wed",
          "start_time": "5:30 AM",
          "end_time": "8:00 PM"
        },
        {
          "day": "Thu",
          "start_time": "5:30 AM",
          "end_time": "8:00 PM"
        },
        {
          "day": "Fri",
          "start_time": "5:30 AM",
          "end_time": "8:00 PM"
        },
        {
          "day": "Sat",
          "start_time": "6:30 AM",
          "end_time": "8:00 PM"
        },
        {
          "day": "Sun",
          "start_time": "6:30 AM",
          "end_time": "6:00 PM"
        }
      ]
    },
    "time_zone": "America/Los_Angeles",
    "generate_barcodes": true
  }
}'
{
  "address": "ADDRESS_GOES_HERE",
  "brand": "Punchh",
  "city": "Mountain View",
  "country": "United States",
  "external_store_id": "46ede9b5-287c-4ac5-84f4-86cb0927c96d",
  "latitude": "37.406756",
  "location_id": 306095,
  "longitude": "-122.109125",
  "name": "Punchh Test Location 1",
  "online_order_url": "URL_GOES_HERE",
  "phone_number": 1111111111,
  "loc_email": "test@example.com",
  "post_code": "94040",
  "state": "California",
  "store_number": "01011-00002",
  "store_tags": "WiFi,DriveThru,GiftCard,Rewards",
  "store_times": [
    {
      "day": "Mon",
      "start_time": "6:30 AM",
      "end_time": "11:00 PM"
    },
    {
      "day": "Tue",
      "start_time": "6:30 AM",
      "end_time": "11:00 PM"
    },
    {
      "day": "Wed",
      "start_time": "6:30 AM",
      "end_time": "11:00 PM"
    },
    {
      "day": "Thu",
      "start_time": "6:30 AM",
      "end_time": "11:00 PM"
    },
    {
      "day": "Fri",
      "start_time": "6:30 AM",
      "end_time": "11:00 PM"
    },
    {
      "day": "Sat",
      "start_time": "6:30 AM",
      "end_time": "1:00 AM"
    },
    {
      "day": "Sun",
      "start_time": "6:30 AM",
      "end_time": "1:00 AM"
    }
  ],
  "time_zone": "America/Los_Angeles",
  "updated_at": "2016-08-04T11:06:04Z",
  "status": "approved",
  "franchisee_id": 1234,
  "enable_weekly_redemption_report": false,
  "checkin_evidenced_by": "barcode",
  "guest_identity_code_type": "barcode",
  "enable_pos_monitoring": true,
  "generate_barcodes": true,
  "location_groups": [
    {
      "location_group_id": 2051,
      "name": "Location Group A"
    },
    {
      "location_group_id": 2052,
      "name": "Location Group B"
    },
    {
      "location_group_id": 2053,
      "name": "Location Group C"
    }
  ],
  "alternate_store_number": "UK@8907",
  "multiple_redemption_on_location": true,
  "additional_url": [
    {
      "label": "reservation",
      "url": "URL_GOES_HERE"
    }
  ]
}