API / Location
Use case / Master data sync
Patch Location
Changed onPartially update an existing location. An update that moves the coordinates far from the current position creates and returns a new location, leaving already existing orders on the original one.
patch/v1/locations/location/{location_id}
Request
- Base URL: https://api.qargo.com
- URL: https://api.qargo.com/v1/locations/location/{location_id}
- Auth: OAuth 2 (client credentials, token URL /v1/auth/token)
Path parameters
location_idstring uuid required
Request body
Example request
{
"latitude": 51.0543,
"longitude": 3.7174,
"code": "LOC123",
"display_name": "Main Office",
"address": "Gaston Crommenlaan 4",
"city": "Ghent",
"country": "BE",
"postal_code": "9050",
"name": "Qargo HQ",
"opening_hours": {
"monday": {
"intervals": [
{
"start_time": "08:00",
"end_time": "17:30"
}
]
},
"tuesday": {
"intervals": [
{
"start_time": "08:00",
"end_time": "17:30"
}
]
},
"wednesday": {
"intervals": [
{
"start_time": "08:00",
"end_time": "17:30"
}
]
},
"thursday": {
"intervals": [
{
"start_time": "08:00",
"end_time": "17:30"
}
]
},
"friday": {
"intervals": [
{
"start_time": "08:00",
"end_time": "17:30"
}
]
},
"saturday": {
"intervals": [
{
"start_time": "08:00",
"end_time": "17:30"
}
]
},
"sunday": {
"intervals": [
{
"start_time": "08:00",
"end_time": "17:30"
}
]
}
}
}Response
Successful Response
Example response
{
"latitude": 51.0543,
"longitude": 3.7174,
"code": "LOC123",
"display_name": "Main Office",
"address": "Gaston Crommenlaan 4",
"city": "Ghent",
"country": "BE",
"postal_code": "9050",
"name": "Qargo HQ",
"opening_hours": {
"monday": {
"intervals": [
{
"start_time": "08:00",
"end_time": "17:30"
}
]
},
"tuesday": {
"intervals": [
{
"start_time": "08:00",
"end_time": "17:30"
}
]
},
"wednesday": {
"intervals": [
{
"start_time": "08:00",
"end_time": "17:30"
}
]
},
"thursday": {
"intervals": [
{
"start_time": "08:00",
"end_time": "17:30"
}
]
},
"friday": {
"intervals": [
{
"start_time": "08:00",
"end_time": "17:30"
}
]
},
"saturday": {
"intervals": [
{
"start_time": "08:00",
"end_time": "17:30"
}
]
},
"sunday": {
"intervals": [
{
"start_time": "08:00",
"end_time": "17:30"
}
]
}
}
}Changes
- info
added the optional property
//to the response with the status - info
added the optional property
//to the response with the status
- info