Headers
The Dispatch Pro platform has specific Request and Response headers.
Request Headers
The following table shows the request headers that Dispatch Pro may use when accepting requests. Not all APIs implement these headers.
Header | Type | Description |
---|---|---|
Authorization | string | Authorization header for the request. This should be a bearer access token retrieved from the authorization server. |
Accept-Language | "en" | Some APIs support a preferred language for the response. |
Content-Type | string | Mime type of the request body. Required for PUT/POST/PATCH. |
Prefer | return=minimal, return=representation | If the return=minimal preference is specified, the service should return an empty body in response to a successful insert or update. If return=representation is specified, the services should return the created or updated resource in the response. Currently not all services respect this header. If this header is omitted in the request the default used is return=minimal. |
Accept | mime type | The accepted response type, either application/json or text/xml |
If-None-Match | "string" | A ETag that the client can specify to make sure a request runs once. This value is a string of ASCII characters placed between double quotes. Not all services use this header. Check service documentation for specific details. |
Standard Response Headers
The following table shows the response headers that Dispatch Pro may use when serving responses. Not all APIs implement these headers.
Header | Required | Description |
---|---|---|
Date | All responses | Timestamp the response was processed, based on the server's clock, in RFC 5322 date and time format. This header MUST be included in the response. Greenwich Mean Time (GMT) MUST be used as the time zone reference for this header. For example: Wed, 24 Aug 2016 18:41:30 GMT. Note that GMT is exactly equal to UTC (Coordinated Universal Time) for this purpose. |
Content-Type | Most responses unless no content is returned | The content type of the data returned. |
Location | PUT and POST | The URI of the resource. |