Introduction
This documentation aims to provide all the information you need to work with our API.
Base URL
http://navapi.localhost
Authenticating requests
Authenticate requests to this API's endpoints 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=nulla&creditLimit=16576.57®isterApproval=officia" \
--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": "nulla",
"creditLimit": "16576.57",
"registerApproval": "officia",
};
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'=> 'nulla',
'creditLimit'=> '16576.57',
'registerApproval'=> 'officia',
],
]
);
$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/reiciendis?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"const url = new URL(
"http://navapi.localhost/approval/reiciendis"
);
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/reiciendis',
[
'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/optio?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"const url = new URL(
"http://navapi.localhost/approval/optio"
);
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/optio',
[
'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=quia&creditLimit=34507.1073®isterApproval=repellendus" \
--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": "quia",
"creditLimit": "34507.1073",
"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/catalogue_layout',
[
'headers' => [
'Content-Type' => 'application/xml',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
'websiteId'=> 'quia',
'creditLimit'=> '34507.1073',
'registerApproval'=> 'repellendus',
],
]
);
$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/aut?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"const url = new URL(
"http://navapi.localhost/catalogue_layout/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: "PUT",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->put(
'http://navapi.localhost/catalogue_layout/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:
Undefined
requires authentication
Example request:
curl --request DELETE \
"http://navapi.localhost/catalogue_layout/qui?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"const url = new URL(
"http://navapi.localhost/catalogue_layout/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/catalogue_layout/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:
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=voluptate&creditLimit=3426.22®isterApproval=ab" \
--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": "voluptate",
"creditLimit": "3426.22",
"registerApproval": "ab",
};
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'=> 'voluptate',
'creditLimit'=> '3426.22',
'registerApproval'=> 'ab',
],
]
);
$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/illum?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"const url = new URL(
"http://navapi.localhost/document/illum"
);
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/illum',
[
'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=impedit&sort_no=dolorum&media_type=2052202.9245&image=dolorum" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "sort_no=397750.37533301" \
--form "image=@/tmp/phpcGxGA5" const url = new URL(
"http://navapi.localhost/image"
);
const params = {
"api_token": "{YOUR_AUTH_KEY}",
"lot_id": "impedit",
"sort_no": "dolorum",
"media_type": "2052202.9245",
"image": "dolorum",
};
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', '397750.37533301');
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'=> 'impedit',
'sort_no'=> 'dolorum',
'media_type'=> '2052202.9245',
'image'=> 'dolorum',
],
'multipart' => [
[
'name' => 'sort_no',
'contents' => '397750.37533301'
],
[
'name' => 'image',
'contents' => fopen('/tmp/phpcGxGA5', '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/sit?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"const url = new URL(
"http://navapi.localhost/image/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/image/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:
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=et&ordering=16.7" \
--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": "et",
"ordering": "16.7",
};
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'=> 'et',
'ordering'=> '16.7',
],
]
);
$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/excepturi?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: multipart/form-data" \
--header "Accept: application/json" \
--form "sort_no=763485" \
--form "image=@/tmp/phpFyw9Lv" const url = new URL(
"http://navapi.localhost/image/excepturi"
);
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', '763485');
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/excepturi',
[
'headers' => [
'Content-Type' => 'multipart/form-data',
'Accept' => 'application/json',
],
'query' => [
'api_token'=> '{YOUR_AUTH_KEY}',
],
'multipart' => [
[
'name' => 'sort_no',
'contents' => '763485'
],
[
'name' => 'image',
'contents' => fopen('/tmp/phpFyw9Lv', '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=non&tableNo=420.5693&relatedSystemId=sed&entryNo=81416254&storageType=recusandae&sortNo=1787512.295&mediaType=veniam&publicMediaPath=dolor&code=aliquam&filename=laborum" \
--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": "non",
"tableNo": "420.5693",
"relatedSystemId": "sed",
"entryNo": "81416254",
"storageType": "recusandae",
"sortNo": "1787512.295",
"mediaType": "veniam",
"publicMediaPath": "dolor",
"code": "aliquam",
"filename": "laborum",
};
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'=> 'non',
'tableNo'=> '420.5693',
'relatedSystemId'=> 'sed',
'entryNo'=> '81416254',
'storageType'=> 'recusandae',
'sortNo'=> '1787512.295',
'mediaType'=> 'veniam',
'publicMediaPath'=> 'dolor',
'code'=> 'aliquam',
'filename'=> 'laborum',
],
]
);
$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=impedit&sortNo=14" \
--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": "impedit",
"sortNo": "14",
};
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'=> 'impedit',
'sortNo'=> '14',
],
]
);
$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/dolorem?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"const url = new URL(
"http://navapi.localhost/media/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: "PUT",
headers,
}).then(response => response.json());$client = new \GuzzleHttp\Client();
$response = $client->put(
'http://navapi.localhost/media/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:
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/adipisci?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"const url = new URL(
"http://navapi.localhost/media/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/media/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:
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\": 3601912.415,
\"customerNo\": \"delectus\",
\"vendorNo\": \"quia\",
\"firstName\": \"ea\",
\"middleName\": \"quasi\",
\"surname\": \"sit\",
\"companyName\": \"assumenda\",
\"email\": \"omnis\",
\"address\": \"cupiditate\",
\"address2\": \"incidunt\",
\"city\": \"velit\",
\"county\": \"totam\",
\"postCode\": \"nesciunt\",
\"country\": \"ut\",
\"phoneNo\": \"sed\",
\"mobileNo\": \"quas\",
\"vatNo\": \"sit\",
\"accountType\": \"consequuntur\",
\"blocked\": false,
\"approved\": true,
\"approvedBy\": \"ipsam\",
\"approvedAt\": \"2024-08-07T19:36:04\",
\"vendorApproved\": true,
\"vendorApprovedBy\": \"similique\",
\"vendorApprovedAt\": \"2024-08-07T19:36:04\",
\"fromWebSourceCode\": \"dolore\",
\"fromWebSourceName\": \"officiis\"
}"
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": 3601912.415,
"customerNo": "delectus",
"vendorNo": "quia",
"firstName": "ea",
"middleName": "quasi",
"surname": "sit",
"companyName": "assumenda",
"email": "omnis",
"address": "cupiditate",
"address2": "incidunt",
"city": "velit",
"county": "totam",
"postCode": "nesciunt",
"country": "ut",
"phoneNo": "sed",
"mobileNo": "quas",
"vatNo": "sit",
"accountType": "consequuntur",
"blocked": false,
"approved": true,
"approvedBy": "ipsam",
"approvedAt": "2024-08-07T19:36:04",
"vendorApproved": true,
"vendorApprovedBy": "similique",
"vendorApprovedAt": "2024-08-07T19:36:04",
"fromWebSourceCode": "dolore",
"fromWebSourceName": "officiis"
};
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' => 3601912.415,
'customerNo' => 'delectus',
'vendorNo' => 'quia',
'firstName' => 'ea',
'middleName' => 'quasi',
'surname' => 'sit',
'companyName' => 'assumenda',
'email' => 'omnis',
'address' => 'cupiditate',
'address2' => 'incidunt',
'city' => 'velit',
'county' => 'totam',
'postCode' => 'nesciunt',
'country' => 'ut',
'phoneNo' => 'sed',
'mobileNo' => 'quas',
'vatNo' => 'sit',
'accountType' => 'consequuntur',
'blocked' => false,
'approved' => true,
'approvedBy' => 'ipsam',
'approvedAt' => '2024-08-07T19:36:04',
'vendorApproved' => true,
'vendorApprovedBy' => 'similique',
'vendorApprovedAt' => '2024-08-07T19:36:04',
'fromWebSourceCode' => 'dolore',
'fromWebSourceName' => 'officiis',
],
]
);
$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\": \"ut\"
}"
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": "ut"
};
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' => 'ut',
],
]
);
$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/dolor?api_token=%7BYOUR_AUTH_KEY%7D" \
--header "Content-Type: application/xml" \
--header "Accept: application/json"const url = new URL(
"http://navapi.localhost/user/dolor"
);
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/dolor',
[
'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: