Reference API Reference Auth This section describes the authentication process for the API.
Login
Creates a login request.
POST
https://api.shipitor.com/auth/login
Request Body
The email you wish to login with.
Copy {
"success": true,
"message": "Token sent to the email address (developers should use the token within the /auth/verifylogin path."
}
Copy curl --request POST \
--url http://api.shipitor.com/auth/login \
--header 'Content-Type: application/json' \
--data '{
"email": "example@gmail.com"
}'
Copy import axios from "axios";
const options = {
method: 'POST',
url: 'http://api.shipitor.com/auth/login',
headers: {'Content-Type': 'application/json' },
data: {email: 'example@gmail.com'}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});
Copy import requests
url = "http://api.shipitor.com/auth/login"
payload = {"email": "example@gmail.com"}
headers = {
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
Once you've entered your email, please click on the "Sign In" button. An email will be sent to the address you provided with a verification link. Click on this link to complete the login process.
If you encounter any issues or do not receive the email, check your spam folder or contact support for assistance.
Verify Login
Valid a login request
POST
https://api.shipitor.com/auth/verifylogin
Validate a login request and get your key.
Request Body
The email you wish to login with.
Copy {
"success": true,
"apikey": "XXXXX",
"message": "Token verified"
}
Copy {
"success": false,
"error": "Invalid token"
}
Copy curl --request POST \
--url http://api.shipitor.com/auth/verifylogin \
--header 'Content-Type: application/json' \
--data '{
"email": "example@gmail.com",
"token": "YOUR TOKEN"
}'
Copy import axios from "axios";
const options = {
method: 'POST',
url: 'http://api.shipitor.com/auth/verifylogin',
headers: {'Content-Type': 'application/json'},
data: {
email: 'example@gmail.com',
token: 'YOUR TOKEN'
}
};
axios.request(options).then(function (response) {
console.log(response.data);
}).catch(function (error) {
console.error(error);
});
Copy import requests
url = "http://api.shipitor.com/auth/verifylogin"
payload = {
"email": "example@gmail.com",
"token": "YOUR TOKEN"
}
headers = {
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers)
print(response.text)
Then once you have the API Key, you can use it to handle account actions or create shipments
in the next section.