Update store location
curl --request PUT \
--url https://api.bitbybit.studio/customer/api/open/v1/shipping/store-locations/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"locationName": "<string>",
"phoneNumber": "<string>",
"country": "<string>",
"countryCode": "<string>",
"province": "<string>",
"provinceCode": "<string>",
"city": "<string>",
"district": "<string>",
"districtId": 123,
"subDistrict": "<string>",
"subDistrictId": 123,
"zip": "<string>",
"address1": "<string>",
"address2": "<string>",
"latitude": 123,
"longitude": 123,
"mainAddress": true
}
'import requests
url = "https://api.bitbybit.studio/customer/api/open/v1/shipping/store-locations/{id}"
payload = {
"locationName": "<string>",
"phoneNumber": "<string>",
"country": "<string>",
"countryCode": "<string>",
"province": "<string>",
"provinceCode": "<string>",
"city": "<string>",
"district": "<string>",
"districtId": 123,
"subDistrict": "<string>",
"subDistrictId": 123,
"zip": "<string>",
"address1": "<string>",
"address2": "<string>",
"latitude": 123,
"longitude": 123,
"mainAddress": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
locationName: '<string>',
phoneNumber: '<string>',
country: '<string>',
countryCode: '<string>',
province: '<string>',
provinceCode: '<string>',
city: '<string>',
district: '<string>',
districtId: 123,
subDistrict: '<string>',
subDistrictId: 123,
zip: '<string>',
address1: '<string>',
address2: '<string>',
latitude: 123,
longitude: 123,
mainAddress: true
})
};
fetch('https://api.bitbybit.studio/customer/api/open/v1/shipping/store-locations/{id}', 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.bitbybit.studio/customer/api/open/v1/shipping/store-locations/{id}",
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([
'locationName' => '<string>',
'phoneNumber' => '<string>',
'country' => '<string>',
'countryCode' => '<string>',
'province' => '<string>',
'provinceCode' => '<string>',
'city' => '<string>',
'district' => '<string>',
'districtId' => 123,
'subDistrict' => '<string>',
'subDistrictId' => 123,
'zip' => '<string>',
'address1' => '<string>',
'address2' => '<string>',
'latitude' => 123,
'longitude' => 123,
'mainAddress' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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.bitbybit.studio/customer/api/open/v1/shipping/store-locations/{id}"
payload := strings.NewReader("{\n \"locationName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"province\": \"<string>\",\n \"provinceCode\": \"<string>\",\n \"city\": \"<string>\",\n \"district\": \"<string>\",\n \"districtId\": 123,\n \"subDistrict\": \"<string>\",\n \"subDistrictId\": 123,\n \"zip\": \"<string>\",\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"mainAddress\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<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.bitbybit.studio/customer/api/open/v1/shipping/store-locations/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"locationName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"province\": \"<string>\",\n \"provinceCode\": \"<string>\",\n \"city\": \"<string>\",\n \"district\": \"<string>\",\n \"districtId\": 123,\n \"subDistrict\": \"<string>\",\n \"subDistrictId\": 123,\n \"zip\": \"<string>\",\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"mainAddress\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitbybit.studio/customer/api/open/v1/shipping/store-locations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"locationName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"province\": \"<string>\",\n \"provinceCode\": \"<string>\",\n \"city\": \"<string>\",\n \"district\": \"<string>\",\n \"districtId\": 123,\n \"subDistrict\": \"<string>\",\n \"subDistrictId\": 123,\n \"zip\": \"<string>\",\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"mainAddress\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"locationName": "<string>",
"phoneNumber": "<string>",
"country": "<string>",
"countryCode": "<string>",
"province": "<string>",
"provinceCode": "<string>",
"city": "<string>",
"district": "<string>",
"districtId": 123,
"subDistrict": "<string>",
"subDistrictId": 123,
"zip": "<string>",
"address1": "<string>",
"address2": "<string>",
"latitude": 123,
"longitude": 123,
"mainAddress": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "origin.districtId is required for KiriminAja Express"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Shipment not found"
}
}Store Locations
Update store location
Update one or more fields on a store location. Setting mainAddress: true will unset the previous main location for this company.
PUT
/
shipping
/
store-locations
/
{id}
Update store location
curl --request PUT \
--url https://api.bitbybit.studio/customer/api/open/v1/shipping/store-locations/{id} \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"locationName": "<string>",
"phoneNumber": "<string>",
"country": "<string>",
"countryCode": "<string>",
"province": "<string>",
"provinceCode": "<string>",
"city": "<string>",
"district": "<string>",
"districtId": 123,
"subDistrict": "<string>",
"subDistrictId": 123,
"zip": "<string>",
"address1": "<string>",
"address2": "<string>",
"latitude": 123,
"longitude": 123,
"mainAddress": true
}
'import requests
url = "https://api.bitbybit.studio/customer/api/open/v1/shipping/store-locations/{id}"
payload = {
"locationName": "<string>",
"phoneNumber": "<string>",
"country": "<string>",
"countryCode": "<string>",
"province": "<string>",
"provinceCode": "<string>",
"city": "<string>",
"district": "<string>",
"districtId": 123,
"subDistrict": "<string>",
"subDistrictId": 123,
"zip": "<string>",
"address1": "<string>",
"address2": "<string>",
"latitude": 123,
"longitude": 123,
"mainAddress": True
}
headers = {
"x-api-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'x-api-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
locationName: '<string>',
phoneNumber: '<string>',
country: '<string>',
countryCode: '<string>',
province: '<string>',
provinceCode: '<string>',
city: '<string>',
district: '<string>',
districtId: 123,
subDistrict: '<string>',
subDistrictId: 123,
zip: '<string>',
address1: '<string>',
address2: '<string>',
latitude: 123,
longitude: 123,
mainAddress: true
})
};
fetch('https://api.bitbybit.studio/customer/api/open/v1/shipping/store-locations/{id}', 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.bitbybit.studio/customer/api/open/v1/shipping/store-locations/{id}",
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([
'locationName' => '<string>',
'phoneNumber' => '<string>',
'country' => '<string>',
'countryCode' => '<string>',
'province' => '<string>',
'provinceCode' => '<string>',
'city' => '<string>',
'district' => '<string>',
'districtId' => 123,
'subDistrict' => '<string>',
'subDistrictId' => 123,
'zip' => '<string>',
'address1' => '<string>',
'address2' => '<string>',
'latitude' => 123,
'longitude' => 123,
'mainAddress' => true
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-api-key: <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.bitbybit.studio/customer/api/open/v1/shipping/store-locations/{id}"
payload := strings.NewReader("{\n \"locationName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"province\": \"<string>\",\n \"provinceCode\": \"<string>\",\n \"city\": \"<string>\",\n \"district\": \"<string>\",\n \"districtId\": 123,\n \"subDistrict\": \"<string>\",\n \"subDistrictId\": 123,\n \"zip\": \"<string>\",\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"mainAddress\": true\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("x-api-key", "<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.bitbybit.studio/customer/api/open/v1/shipping/store-locations/{id}")
.header("x-api-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"locationName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"province\": \"<string>\",\n \"provinceCode\": \"<string>\",\n \"city\": \"<string>\",\n \"district\": \"<string>\",\n \"districtId\": 123,\n \"subDistrict\": \"<string>\",\n \"subDistrictId\": 123,\n \"zip\": \"<string>\",\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"mainAddress\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.bitbybit.studio/customer/api/open/v1/shipping/store-locations/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["x-api-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"locationName\": \"<string>\",\n \"phoneNumber\": \"<string>\",\n \"country\": \"<string>\",\n \"countryCode\": \"<string>\",\n \"province\": \"<string>\",\n \"provinceCode\": \"<string>\",\n \"city\": \"<string>\",\n \"district\": \"<string>\",\n \"districtId\": 123,\n \"subDistrict\": \"<string>\",\n \"subDistrictId\": 123,\n \"zip\": \"<string>\",\n \"address1\": \"<string>\",\n \"address2\": \"<string>\",\n \"latitude\": 123,\n \"longitude\": 123,\n \"mainAddress\": true\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "<string>",
"locationName": "<string>",
"phoneNumber": "<string>",
"country": "<string>",
"countryCode": "<string>",
"province": "<string>",
"provinceCode": "<string>",
"city": "<string>",
"district": "<string>",
"districtId": 123,
"subDistrict": "<string>",
"subDistrictId": 123,
"zip": "<string>",
"address1": "<string>",
"address2": "<string>",
"latitude": 123,
"longitude": 123,
"mainAddress": true,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}
}{
"error": {
"code": "VALIDATION_ERROR",
"message": "origin.districtId is required for KiriminAja Express"
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "Invalid API key"
}
}{
"error": {
"code": "NOT_FOUND",
"message": "Shipment not found"
}
}Authorizations
API key for authentication. Create one in Settings > Developer. The key must have the BITCRM product scope and an orders resource scope; required action depends on the endpoint (READ, WRITE, or DELETE).
Path Parameters
Body
application/json
Maximum string length:
255Response
Updated.
Show child attributes
Show child attributes
⌘I

