API Reference
Basic API Structure
URL
A Path can have multiple parameters.
Methods
Method | Description |
---|---|
GET | Retrieve information about the REST API resource. |
POST | Create a REST API resource. |
PUT | Update a REST API resource. |
DELETE | Delete a REST API resource or related component. |
Headers
Headers contain additional information about the request or response, such as the content type, authentication, and other metadata. The Following headers and combinations of key & value pairs are in the API call.
Key | value | Description |
---|---|---|
Content-Type | application/json | DPS API supports the MIME media type for JSON text is application/json. The default encoding is UTF-8. |
X-API-KEY | Your authorization key | Required for authenticating all API calls. |
ShipperHash | Your Shipper Code | You will get your shipper ID code once you create a shipper. |
Payload
Payload refers to the data being transmitted in an HTTP request or response, which carries the requested information or the response data.
Response
API response is the data returned by a server to a client in response to an API request, typically including a status code, headers, and a payload containing the requested information.
Errors
Errors are abnormal conditions or exceptional situations that occur during the execution of an API request, indicating that the desired outcome was not achieved, and typically returning a non-200 status code along with a descriptive error message.
Response Codes
HTTP Code | Meaning |
---|---|
200 | OK : Indicates that the request was successful and the requested information is included in the response payload. |
201 | Created : Indicates that a new resource was successfully created as a result of the request, and the newly created resource is included in the response payload. |
400 | Bad Request : Indicates that the request from the client was malformed or invalid. |
401 | Unauthorized : Indicates that the client is not authorized to access the requested resource. |
402 | Upstream Processor Error : Errors caused by 3rd party service. |
403 | Forbidden : Indicates that the client is authenticated but lacks the necessary permissions to access the requested resource. |
404 | Not Found : Indicates that the requested resource could not be found on the server. |
500 | Internal Server Error : Indicates that an unexpected error occurred on the server while processing the request. |
502 | Bad Gateway : Indicates that the server received an invalid response from an upstream server while processing the request. |
503 | Service Unavailable: Indicates that the server is temporarily unable to handle the request due to maintenance or overload. |
504 | Gateway Timeout: Indicates that the server did not receive a timely response from an upstream server while processing the request. |