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.
Approvals
APIs for post an registration and credit limit approval
Post an registration and credit limit approval.
requires authentication
This endpoint allows you to update a user's credit limit in the AM system.
Example request:
curl --request POST \
"http://navapi.localhost/approval?api_token=%7BYOUR_AUTH_KEY%7D&websiteId=ex&creditLimit=0.3®isterApproval=unde" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/approval"
);
const params = {
"api_token": "{YOUR_AUTH_KEY}",
"websiteId": "ex",
"creditLimit": "0.3",
"registerApproval": "unde",
};
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/approval',
[
'headers' => [
'Content-Type' => 'application/xml',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
'websiteId'=> 'ex',
'creditLimit'=> '0.3',
'registerApproval'=> 'unde',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Update credit limit
requires authentication
This endpoint allows you to update a user's credit limit in the AM system.
Example request:
curl --request PUT \
"http://navapi.localhost/approval/modi?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/approval/modi"
);
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/approval/modi',
[
'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:
Undefined
requires authentication
Example request:
curl --request DELETE \
"http://navapi.localhost/approval/sint?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/approval/sint"
);
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/approval/sint',
[
'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:
Catalogue layout management
APIs for managing catalogue layouts
Post an registration and credit limit approval.
requires authentication
This endpoint allows you to update a user's credit limit in the AM system.
Example request:
curl --request POST \
"http://navapi.localhost/catalogue_layout?api_token=%7BYOUR_AUTH_KEY%7D&websiteId=sapiente&creditLimit=81.52429062®isterApproval=recusandae" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/catalogue_layout"
);
const params = {
"api_token": "{YOUR_AUTH_KEY}",
"websiteId": "sapiente",
"creditLimit": "81.52429062",
"registerApproval": "recusandae",
};
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/catalogue_layout',
[
'headers' => [
'Content-Type' => 'application/xml',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
'websiteId'=> 'sapiente',
'creditLimit'=> '81.52429062',
'registerApproval'=> 'recusandae',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Update
requires authentication
Example request:
curl --request PUT \
"http://navapi.localhost/catalogue_layout/voluptatibus?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/catalogue_layout/voluptatibus"
);
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/catalogue_layout/voluptatibus',
[
'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:
Undefined
requires authentication
Example request:
curl --request DELETE \
"http://navapi.localhost/catalogue_layout/est?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/catalogue_layout/est"
);
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/catalogue_layout/est',
[
'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:
Document management
APIs for managing documents
Post an registration and credit limit approval.
requires authentication
This endpoint allows you to update a user's credit limit in the AM system.
Example request:
curl --request POST \
"http://navapi.localhost/document?api_token=%7BYOUR_AUTH_KEY%7D&websiteId=quasi&creditLimit=4347.3751444®isterApproval=repellendus" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/document"
);
const params = {
"api_token": "{YOUR_AUTH_KEY}",
"websiteId": "quasi",
"creditLimit": "4347.3751444",
"registerApproval": "repellendus",
};
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/document',
[
'headers' => [
'Content-Type' => 'application/xml',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
'websiteId'=> 'quasi',
'creditLimit'=> '4347.3751444',
'registerApproval'=> 'repellendus',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
PUT document/{id}
requires authentication
Example request:
curl --request PUT \
"http://navapi.localhost/document/delectus?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/document/delectus"
);
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/document/delectus',
[
'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:
Undefined
requires authentication
Example request:
curl --request DELETE \
"http://navapi.localhost/document/explicabo?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/document/explicabo"
);
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/document/explicabo',
[
'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:
Image management for Non-NAV clients
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&lot_id=ut&sort_no=quam&media_type=7454.173353&image=qui" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "sort_no=457.48824" \
--form "image=@/tmp/phpmH5npm"
const url = new URL(
"http://navapi.localhost/image"
);
const params = {
"api_token": "{YOUR_AUTH_KEY}",
"lot_id": "ut",
"sort_no": "quam",
"media_type": "7454.173353",
"image": "qui",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('sort_no', '457.48824');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://navapi.localhost/image',
[
'headers' => [
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
'lot_id'=> 'ut',
'sort_no'=> 'quam',
'media_type'=> '7454.173353',
'image'=> 'qui',
],
'multipart' => [
[
'name' => 'sort_no',
'contents' => '457.48824'
],
[
'name' => 'image',
'contents' => fopen('/tmp/phpmH5npm', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Update sort order.
requires authentication
This endpoint allows to bulk update the sort order of images in the AM system.
Example request:
curl --request POST \
"http://navapi.localhost/image/sort?api_token=%7BYOUR_AUTH_KEY%7D&imageId=dolores&ordering=2467.065868141" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/image/sort"
);
const params = {
"api_token": "{YOUR_AUTH_KEY}",
"imageId": "dolores",
"ordering": "2467.065868141",
};
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/sort',
[
'headers' => [
'Content-Type' => 'application/xml',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
'imageId'=> 'dolores',
'ordering'=> '2467.065868141',
],
]
);
$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/adipisci?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/image/adipisci"
);
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/adipisci',
[
'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:
Update an image.
requires authentication
This endpoint allows you to update an image in the AM system.
Example request:
curl --request POST \
"http://navapi.localhost/image/dolor?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "sort_no=15.411232" \
--form "image=@/tmp/phpITA4Kc"
const url = new URL(
"http://navapi.localhost/image/dolor"
);
const params = {
"api_token": "{YOUR_AUTH_KEY}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('sort_no', '15.411232');
body.append('image', document.querySelector('input[name="image"]').files[0]);
fetch(url, {
method: "POST",
headers,
body,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://navapi.localhost/image/dolor',
[
'headers' => [
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
],
'multipart' => [
[
'name' => 'sort_no',
'contents' => '15.411232'
],
[
'name' => 'image',
'contents' => fopen('/tmp/phpITA4Kc', 'r')
],
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Media management from NAV
APIs for managing media from NAV
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/media?api_token=%7BYOUR_AUTH_KEY%7D&systemId=voluptatem&tableNo=13581241.31&relatedSystemId=velit&entryNo=24.531666186&storageType=perferendis&sortNo=2404.31026&mediaType=vel&publicMediaPath=vero&code=beatae&filename=animi" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/media"
);
const params = {
"api_token": "{YOUR_AUTH_KEY}",
"systemId": "voluptatem",
"tableNo": "13581241.31",
"relatedSystemId": "velit",
"entryNo": "24.531666186",
"storageType": "perferendis",
"sortNo": "2404.31026",
"mediaType": "vel",
"publicMediaPath": "vero",
"code": "beatae",
"filename": "animi",
};
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/media',
[
'headers' => [
'Content-Type' => 'application/xml',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
'systemId'=> 'voluptatem',
'tableNo'=> '13581241.31',
'relatedSystemId'=> 'velit',
'entryNo'=> '24.531666186',
'storageType'=> 'perferendis',
'sortNo'=> '2404.31026',
'mediaType'=> 'vel',
'publicMediaPath'=> 'vero',
'code'=> 'beatae',
'filename'=> 'animi',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Update sort order.
requires authentication
This endpoint allows to bulk update the sort order of images in the AM system.
Example request:
curl --request POST \
"http://navapi.localhost/media/sort?api_token=%7BYOUR_AUTH_KEY%7D&systemId=dolor&sortNo=21759.2" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/media/sort"
);
const params = {
"api_token": "{YOUR_AUTH_KEY}",
"systemId": "dolor",
"sortNo": "21759.2",
};
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/media/sort',
[
'headers' => [
'Content-Type' => 'application/xml',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
'systemId'=> 'dolor',
'sortNo'=> '21759.2',
],
]
);
$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/media/est?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/media/est"
);
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/media/est',
[
'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/media/maxime?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/media/maxime"
);
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/media/maxime',
[
'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:
User management
APIs for managing images
Post a user record
requires authentication
This endpoint allows you to create a new AM user record or update an existing one
Example request:
curl --request POST \
"http://navapi.localhost/user?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/user"
);
const params = {
"api_token": "{YOUR_AUTH_KEY}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
fetch(url, {
method: "POST",
headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->post(
'http://navapi.localhost/user',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
PUT user
requires authentication
Example request:
curl --request PUT \
"http://navapi.localhost/user?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json" \
--data "{
\"websiteID\": 408435.983,
\"customerNo\": \"consequuntur\",
\"vendorNo\": \"possimus\",
\"firstName\": \"ex\",
\"middleName\": \"aut\",
\"surname\": \"eos\",
\"companyName\": \"est\",
\"email\": \"optio\",
\"address\": \"corrupti\",
\"address2\": \"quaerat\",
\"city\": \"qui\",
\"county\": \"debitis\",
\"postCode\": \"delectus\",
\"country\": \"et\",
\"phoneNo\": \"aperiam\",
\"mobileNo\": \"aut\",
\"vatNo\": \"provident\",
\"accountType\": \"et\",
\"blocked\": true
}"
const url = new URL(
"http://navapi.localhost/user"
);
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",
};
let body = {
"websiteID": 408435.983,
"customerNo": "consequuntur",
"vendorNo": "possimus",
"firstName": "ex",
"middleName": "aut",
"surname": "eos",
"companyName": "est",
"email": "optio",
"address": "corrupti",
"address2": "quaerat",
"city": "qui",
"county": "debitis",
"postCode": "delectus",
"country": "et",
"phoneNo": "aperiam",
"mobileNo": "aut",
"vatNo": "provident",
"accountType": "et",
"blocked": true
};
fetch(url, {
method: "PUT",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->put(
'http://navapi.localhost/user',
[
'headers' => [
'Content-Type' => 'application/xml',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
],
'json' => [
'websiteID' => 408435.983,
'customerNo' => 'consequuntur',
'vendorNo' => 'possimus',
'firstName' => 'ex',
'middleName' => 'aut',
'surname' => 'eos',
'companyName' => 'est',
'email' => 'optio',
'address' => 'corrupti',
'address2' => 'quaerat',
'city' => 'qui',
'county' => 'debitis',
'postCode' => 'delectus',
'country' => 'et',
'phoneNo' => 'aperiam',
'mobileNo' => 'aut',
'vatNo' => 'provident',
'accountType' => 'et',
'blocked' => true,
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Received response:
Request failed with error:
Get a user record
requires authentication
This endpoint allows you to get AM user record details via the email address
Example request:
curl --request GET \
--get "http://navapi.localhost/user?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/json" \
--header "Accept: application/json" \
--data "{
\"email\": \"dignissimos\"
}"
const url = new URL(
"http://navapi.localhost/user"
);
const params = {
"api_token": "{YOUR_AUTH_KEY}",
};
Object.keys(params)
.forEach(key => url.searchParams.append(key, params[key]));
const headers = {
"Content-Type": "application/json",
"Accept": "application/json",
};
let body = {
"email": "dignissimos"
};
fetch(url, {
method: "GET",
headers,
body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$response = $client->get(
'http://navapi.localhost/user',
[
'headers' => [
'Content-Type' => 'application/json',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
],
'json' => [
'email' => 'dignissimos',
],
]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
Example response (500):
Show headers
cache-control: no-cache, private
content-type: application/json
{
"message": "Server Error"
}
Received response:
Request failed with error:
Undefined
requires authentication
Example request:
curl --request DELETE \
"http://navapi.localhost/user/maxime?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/user/maxime"
);
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/user/maxime',
[
'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: