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=quia&creditLimit=174409424.799®isterApproval=rerum" \
--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": "quia",
"creditLimit": "174409424.799",
"registerApproval": "rerum",
};
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'=> 'quia',
'creditLimit'=> '174409424.799',
'registerApproval'=> 'rerum',
],
]
);
$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/voluptas?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/approval/voluptas"
);
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/voluptas',
[
'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/sapiente?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/approval/sapiente"
);
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/sapiente',
[
'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=sed&creditLimit=179254857.97639®isterApproval=a" \
--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": "sed",
"creditLimit": "179254857.97639",
"registerApproval": "a",
};
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'=> 'sed',
'creditLimit'=> '179254857.97639',
'registerApproval'=> 'a',
],
]
);
$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/ullam?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/catalogue_layout/ullam"
);
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/ullam',
[
'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/sit?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/catalogue_layout/sit"
);
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/sit',
[
'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=id&creditLimit=240646231®isterApproval=ducimus" \
--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": "id",
"creditLimit": "240646231",
"registerApproval": "ducimus",
};
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'=> 'id',
'creditLimit'=> '240646231',
'registerApproval'=> 'ducimus',
],
]
);
$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/ipsa?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/document/ipsa"
);
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/ipsa',
[
'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/dolorem?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/document/dolorem"
);
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/dolorem',
[
'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=accusantium&sort_no=autem&media_type=0.685106216&image=vitae" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "sort_no=2288" \
--form "image=@/tmp/phpHG0waJ"
const url = new URL(
"http://navapi.localhost/image"
);
const params = {
"api_token": "{YOUR_AUTH_KEY}",
"lot_id": "accusantium",
"sort_no": "autem",
"media_type": "0.685106216",
"image": "vitae",
};
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', '2288');
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'=> 'accusantium',
'sort_no'=> 'autem',
'media_type'=> '0.685106216',
'image'=> 'vitae',
],
'multipart' => [
[
'name' => 'sort_no',
'contents' => '2288'
],
[
'name' => 'image',
'contents' => fopen('/tmp/phpHG0waJ', 'r')
],
],
]
);
$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/cupiditate?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/image/cupiditate"
);
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/cupiditate',
[
'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 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=consequatur&ordering=393499.73367302" \
--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": "consequatur",
"ordering": "393499.73367302",
};
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'=> 'consequatur',
'ordering'=> '393499.73367302',
],
]
);
$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/ut?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "sort_no=1.887" \
--form "image=@/tmp/phprAJGhb"
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": "multipart/form-data",
"Accept": "application/json",
};
const body = new FormData();
body.append('sort_no', '1.887');
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/ut',
[
'headers' => [
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
],
'multipart' => [
[
'name' => 'sort_no',
'contents' => '1.887'
],
[
'name' => 'image',
'contents' => fopen('/tmp/phprAJGhb', '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=reprehenderit&tableNo=30218530.532&relatedSystemId=occaecati&entryNo=4705579.773694&storageType=dolorem&sortNo=2274&mediaType=voluptatibus&publicMediaPath=cupiditate&code=rerum&filename=dicta" \
--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": "reprehenderit",
"tableNo": "30218530.532",
"relatedSystemId": "occaecati",
"entryNo": "4705579.773694",
"storageType": "dolorem",
"sortNo": "2274",
"mediaType": "voluptatibus",
"publicMediaPath": "cupiditate",
"code": "rerum",
"filename": "dicta",
};
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'=> 'reprehenderit',
'tableNo'=> '30218530.532',
'relatedSystemId'=> 'occaecati',
'entryNo'=> '4705579.773694',
'storageType'=> 'dolorem',
'sortNo'=> '2274',
'mediaType'=> 'voluptatibus',
'publicMediaPath'=> 'cupiditate',
'code'=> 'rerum',
'filename'=> 'dicta',
],
]
);
$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=incidunt&sortNo=648836.95" \
--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": "incidunt",
"sortNo": "648836.95",
};
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'=> 'incidunt',
'sortNo'=> '648836.95',
],
]
);
$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/eum?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/media/eum"
);
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/eum',
[
'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/qui?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/media/qui"
);
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/qui',
[
'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\": 3,
\"customerNo\": \"aspernatur\",
\"vendorNo\": \"ipsam\",
\"firstName\": \"molestiae\",
\"middleName\": \"accusantium\",
\"surname\": \"dolorum\",
\"companyName\": \"est\",
\"email\": \"dolorem\",
\"address\": \"molestiae\",
\"address2\": \"doloribus\",
\"city\": \"dolore\",
\"county\": \"voluptas\",
\"postCode\": \"vel\",
\"country\": \"praesentium\",
\"phoneNo\": \"sint\",
\"mobileNo\": \"officia\",
\"vatNo\": \"ea\",
\"accountType\": \"doloremque\",
\"blocked\": false,
\"approved\": true,
\"approvedBy\": \"nesciunt\",
\"approvedAt\": \"2024-08-07T19:34:13\",
\"vendorApproved\": false,
\"vendorApprovedBy\": \"quibusdam\",
\"vendorApprovedAt\": \"2024-08-07T19:34:13\",
\"fromWebSourceCode\": \"est\",
\"fromWebSourceName\": \"quod\"
}"
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": 3,
"customerNo": "aspernatur",
"vendorNo": "ipsam",
"firstName": "molestiae",
"middleName": "accusantium",
"surname": "dolorum",
"companyName": "est",
"email": "dolorem",
"address": "molestiae",
"address2": "doloribus",
"city": "dolore",
"county": "voluptas",
"postCode": "vel",
"country": "praesentium",
"phoneNo": "sint",
"mobileNo": "officia",
"vatNo": "ea",
"accountType": "doloremque",
"blocked": false,
"approved": true,
"approvedBy": "nesciunt",
"approvedAt": "2024-08-07T19:34:13",
"vendorApproved": false,
"vendorApprovedBy": "quibusdam",
"vendorApprovedAt": "2024-08-07T19:34:13",
"fromWebSourceCode": "est",
"fromWebSourceName": "quod"
};
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' => 3.0,
'customerNo' => 'aspernatur',
'vendorNo' => 'ipsam',
'firstName' => 'molestiae',
'middleName' => 'accusantium',
'surname' => 'dolorum',
'companyName' => 'est',
'email' => 'dolorem',
'address' => 'molestiae',
'address2' => 'doloribus',
'city' => 'dolore',
'county' => 'voluptas',
'postCode' => 'vel',
'country' => 'praesentium',
'phoneNo' => 'sint',
'mobileNo' => 'officia',
'vatNo' => 'ea',
'accountType' => 'doloremque',
'blocked' => false,
'approved' => true,
'approvedBy' => 'nesciunt',
'approvedAt' => '2024-08-07T19:34:13',
'vendorApproved' => false,
'vendorApprovedBy' => 'quibusdam',
'vendorApprovedAt' => '2024-08-07T19:34:13',
'fromWebSourceCode' => 'est',
'fromWebSourceName' => 'quod',
],
]
);
$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\": \"voluptate\"
}"
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": "voluptate"
};
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' => 'voluptate',
],
]
);
$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/ea?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"
const url = new URL(
"http://navapi.localhost/user/ea"
);
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/ea',
[
'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: