Appearance
Headers
Every endpoint uses the same set of headers. Some come from the caller and some are added by the gateway.
Request headers
| Header | Required | Source | Description |
|---|---|---|---|
Asurion-correlationid | yes | Caller correlationid | Id for this request. Returned as correlationId in error bodies |
Asurion-enduser | yes | Caller asurion-enduser, otherwise username | Acting user |
Asurion-sourcesystem | yes | Caller sender | System that sent the request |
Asurion-serviceprovider | yes | Caller companyid | Service provider context |
Asurion-client | yes | Gateway | Set to default |
Content-Type | yes, on requests with a body | Gateway | application/json |
Authorization | yes | Gateway | Service credential. Also carries the user token on endpoints that act for the signed-in user. See Authentication |
x-api-key | yes | Gateway | API key |
Endpoint pages do not repeat this table. A page mentions a header only when it has extra rules. For example, Forgot password requires Asurion-enduser to match the account on verify.
Correlation id
Send a new Asurion-correlationid for each request. Use the same value in your own logs. The id comes back in error responses, so you can match a failure to the request that caused it.
Example
bash
curl --request POST 'https://[BASE_URL]/fieldservicegateway/usermanagement/v3/user/detail' \
--header 'Content-Type: application/json' \
--header 'x-api-key: {{x-api-key}}' \
--header 'Authorization: {{Authorization}}' \
--header 'Asurion-correlationid: correlation-id' \
--header 'Asurion-enduser: end-user' \
--header 'Asurion-sourcesystem: source-system' \
--header 'Asurion-serviceprovider: company-id' \
--header 'Asurion-client: default' \
--data '{
"userNumber": 1001
}'