Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
API Reference
Update an existing location’s name and address fields
cURL
curl --request PUT \ --url https://api.hit-pay.com/v1/locations/{location} \ --header 'Content-Type: application/json' \ --header 'X-BUSINESS-API-KEY: <x-business-api-key>' \ --data ' { "name": "Main Store", "street": "123 Main St", "city": "Singapore", "state": "Singapore", "country": "SG", "postal_code": "123456" } '
import requests url = "https://api.hit-pay.com/v1/locations/{location}" payload = { "name": "Main Store", "street": "123 Main St", "city": "Singapore", "state": "Singapore", "country": "SG", "postal_code": "123456" } headers = { "X-BUSINESS-API-KEY": "<x-business-api-key>", "Content-Type": "application/json" } response = requests.put(url, json=payload, headers=headers) print(response.text)
const options = { method: 'PUT', headers: { 'X-BUSINESS-API-KEY': '<x-business-api-key>', 'Content-Type': 'application/json' }, body: JSON.stringify({ name: 'Main Store', street: '123 Main St', city: 'Singapore', state: 'Singapore', country: 'SG', postal_code: '123456' }) }; fetch('https://api.hit-pay.com/v1/locations/{location}', options) .then(res => res.json()) .then(res => console.log(res)) .catch(err => console.error(err));
<?php $curl = curl_init(); curl_setopt_array($curl, [ CURLOPT_URL => "https://api.hit-pay.com/v1/locations/{location}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => "", CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "PUT", CURLOPT_POSTFIELDS => json_encode([ 'name' => 'Main Store', 'street' => '123 Main St', 'city' => 'Singapore', 'state' => 'Singapore', 'country' => 'SG', 'postal_code' => '123456' ]), CURLOPT_HTTPHEADER => [ "Content-Type: application/json", "X-BUSINESS-API-KEY: <x-business-api-key>" ], ]); $response = curl_exec($curl); $err = curl_error($curl); curl_close($curl); if ($err) { echo "cURL Error #:" . $err; } else { echo $response; }
package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://api.hit-pay.com/v1/locations/{location}" payload := strings.NewReader("{\n \"name\": \"Main Store\",\n \"street\": \"123 Main St\",\n \"city\": \"Singapore\",\n \"state\": \"Singapore\",\n \"country\": \"SG\",\n \"postal_code\": \"123456\"\n}") req, _ := http.NewRequest("PUT", url, payload) req.Header.Add("X-BUSINESS-API-KEY", "<x-business-api-key>") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(string(body)) }
HttpResponse<String> response = Unirest.put("https://api.hit-pay.com/v1/locations/{location}") .header("X-BUSINESS-API-KEY", "<x-business-api-key>") .header("Content-Type", "application/json") .body("{\n \"name\": \"Main Store\",\n \"street\": \"123 Main St\",\n \"city\": \"Singapore\",\n \"state\": \"Singapore\",\n \"country\": \"SG\",\n \"postal_code\": \"123456\"\n}") .asString();
require 'uri' require 'net/http' url = URI("https://api.hit-pay.com/v1/locations/{location}") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Put.new(url) request["X-BUSINESS-API-KEY"] = '<x-business-api-key>' request["Content-Type"] = 'application/json' request.body = "{\n \"name\": \"Main Store\",\n \"street\": \"123 Main St\",\n \"city\": \"Singapore\",\n \"state\": \"Singapore\",\n \"country\": \"SG\",\n \"postal_code\": \"123456\"\n}" response = http.request(request) puts response.read_body
{ "id": "9c484458-b2a3-4f49-87ed-ad9ea71b0df3", "business_id": "8a1f2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d", "name": "Main Store", "street": "123 Main St", "city": "Singapore", "state": "Singapore", "country": "SG", "postal_code": "123456", "active": true, "pickups": [ {} ], "created_at": "2023-11-07T05:31:56Z", "updated_at": "2023-11-07T05:31:56Z" }
{ "message": "<string>", "errors": "<array>" }
"b286daabf9921b5a01a4621f026c111e046f8911feba212996c92159b98427d"
Location ID
255
"Main Store"
"123 Main St"
"Singapore"
"SG"
16
"123456"
Location updated successfully
"9c484458-b2a3-4f49-87ed-ad9ea71b0df3"
Business that owns this location
"8a1f2c3d-4e5f-6a7b-8c9d-0e1f2a3b4c5d"
Name of the location
Street address
City
State or region
Country code or name
Postal code
Whether the location is active
true
Pickup configurations linked to this location (empty when not loaded)
Was this page helpful?