Getting Started
To get started with an API N&H OMS, one of the first steps is to ensure that your application can properly authenticate with the API. This often involves setting an authorization header in your HTTP requests. Here’s a guide on how to set up and use the authorization header for API requests:
Common Authorization Methods
- Register for API Access
- API Key
Setting Up Authorization Headers
1. Register for API Access
To begin using N&H Open API, you need to register for API access by contact local sale team.
2. API Key
An API key is a simple encrypted string that identifies the client accessing the API.
Example Header:
Authorization: Api-Key your_api_key_here
Steps:
- Obtain the API key from your OMS provider.
- Include the API key in the authorization header of your requests.
Example in cURL:
curl -H "Authorization: Api-Key your_api_key_here" https://api.example.com/orders
Example in Python (using requests
library):
import requests
url = 'https://api.example.com/orders'
headers = {'Authorization': 'Api-Key your_api_key_here'}
response = requests.get(url, headers=headers)
print(response.json())
Summary
Ensure you understand the specific authorization method required by your OMS API by referring to their documentation. Once authenticated, you can proceed to make API calls to manage orders, inventory, shipments, and other resources provided by the OMS.