Mock response headers let a Reseller test Entitlement API behavior in DVM Sandbox without sending the request to a Content Provider or downstream mock service.
Add the X-Magic-Number header to a Reseller-to-DVM Entitlement API request to make DVM simulate a known Content Provider response.
Mock response headers apply to the Reseller-to-DVM Entitlement API only at this time. They are not a general DVM testing mechanism and are not supported by the Offer Catalog, Consumer Offers, Eligibility, Billing and Charging, Partner Management, or reporting APIs unless separately documented.
Use mock response headers when you need to test how your Entitlement API integration handles a predictable downstream result, including happy paths, asynchronous responses, and errors.
They are useful because:
- You send the same Entitlement API request body used in a normal integration.
- You do not need a live Content Provider or a configured downstream mock.
- The requested response is deterministic.
- DVM creates the entitlement state needed for subsequent Entitlement API testing where the scenario supports it.
What they do not test
Mock response headers stop the Entitlement API flow before DVM calls the Content Provider.
They therefore do not validate:
- The Content Provider endpoint.
- Outbound authentication from DVM to the Content Provider.
- Content Provider-specific API behavior.
- A complete three-party integration.
Use Bango Music when you need a Bango-operated test Content Provider and a fuller end-to-end entitlement flow.
Add X-Magic-Number to the Entitlement API request with the scenario you want DVM to simulate.
For example, when creating an entitlement:
Use the Sandbox Entitlement API base URL, credentials, and identifiers supplied for your integration.
Supported scenarios
Create entitlement
| Header value | Simulated behavior |
|---|
CREATE_REQUEST_RETURNS_ACTIVATED | Simulates a synchronous Content Provider response that activates the entitlement. |
CREATE_REQUEST_RETURNS_CREATED | Simulates creation without activation. The entitlement remains pending activation. |
CREATE_REQUEST_RETURNS_ACTIVATION_REQUIRED | Simulates an asynchronous activation flow and returns mock activation information. |
Suspend
Terminate, cancel, or revoke
Update
Error responses
| Header value | Simulated response |
|---|
ANY_REQUEST_RETURNS_BAD_REQUEST | 400 Bad Request |
ANY_REQUEST_RETURNS_UNAUTHORIZED | 401 Unauthorized |
ANY_REQUEST_RETURNS_CONFLICT | 409 Conflict |
ANY_REQUEST_RETURNS_INTERNAL_SERVER_ERROR | 500 Internal Server Error |
ANY_REQUEST_RETURNS_SERVICE_UNAVAILABLE | 503 Service Unavailable |
For certification, follow the test plan provided by Bango. It will identify when to use mock response headers, Bango Music, or the intended Content Provider.