API Reference
Overview
Become familiar with the Mergent API.
Authentication
Authentication to the API is performed via HTTP Basic Auth. Provide your API key as the basic auth username value. You do not need to provide a password.
If you need to authenticate via bearer auth (e.g., for a cross-origin request), use -H "Authorization: Bearer yourapikey"
instead of -u yourapikey
.
All API requests must be made over HTTPS. Calls made over plain HTTP will fail. API requests without authentication will also fail.
curl https://api.mergent.co/v2 \
-u yourapikey:
# The colon prevents curl from asking for a password.
Errors
Mergent uses conventional HTTP response codes to indicate the success or failure of an API request. In general:
- Codes in the
2xx
range indicate success. - Codes in the
4xx
range indicate an error that failed given the information provided (e.g., a required parameter was omitted, etc.). - Codes in the
5xx
range indicate an error with Mergent’s servers.
Was this page helpful?