Introduction
This documentation aims to provide all the information you need to work with our API.
Base URL
http://navapi.localhost
Authenticating requests
This API is authenticated by sending a query parameter api_token in the request.
All authenticated endpoints are marked with a requires authentication badge in the documentation below.
You can retrieve your token by request to devops@auctionmarketer.co.uk.
Image management
APIs for managing images
Post an image.
requires authentication
This endpoint allows you to add an image to the AM system linked to a lot.
Example request:
curl --request POST \
"http://navapi.localhost/image?api_token=%7BYOUR_AUTH_KEY%7D&systemId=eos&tableNo=10088864.927432&relatedSystemId=libero&entryNo=3700.465&storageType=tempora&sortNo=19.6665&mediaType=est&publicMediaPath=ut&code=asperiores&filename=consequatur" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"const url = new URL(
"http://navapi.localhost/image"
);
const params = {
"api_token": "{YOUR_AUTH_KEY}",
"systemId": "eos",
"tableNo": "10088864.927432",
"relatedSystemId": "libero",
"entryNo": "3700.465",
"storageType": "tempora",
"sortNo": "19.6665",
"mediaType": "est",
"publicMediaPath": "ut",
"code": "asperiores",
"filename": "consequatur",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/xml",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://navapi.localhost/image',
[
'headers' => [
'Content-Type' => 'application/xml',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
'systemId'=> 'eos',
'tableNo'=> '10088864.927432',
'relatedSystemId'=> 'libero',
'entryNo'=> '3700.465',
'storageType'=> 'tempora',
'sortNo'=> '19.6665',
'mediaType'=> 'est',
'publicMediaPath'=> 'ut',
'code'=> 'asperiores',
'filename'=> 'consequatur',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Update an image.
requires authentication
This endpoint allows you to update an image in the AM system.
Example request:
curl --request PUT \
"http://navapi.localhost/image/ut?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"const url = new URL(
"http://navapi.localhost/image/ut"
);
const params = {
"api_token": "{YOUR_AUTH_KEY}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/xml",
"Accept": "application/json",
};
fetch(url, {
method: "PUT",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->put(
'http://navapi.localhost/image/ut',
[
'headers' => [
'Content-Type' => 'application/xml',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error:
Soft delete an image.
requires authentication
This endpoint allows you to soft delete an image in the AM system.
Example request:
curl --request DELETE \
"http://navapi.localhost/image/aut?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"const url = new URL(
"http://navapi.localhost/image/aut"
);
const params = {
"api_token": "{YOUR_AUTH_KEY}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/xml",
"Accept": "application/json",
};
fetch(url, {
method: "DELETE",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->delete(
'http://navapi.localhost/image/aut',
[
'headers' => [
'Content-Type' => 'application/xml',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));Received response:
Request failed with error: