Skip to main content
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.

When to use mock response headers

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 the header

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 valueSimulated behavior
CREATE_REQUEST_RETURNS_ACTIVATEDSimulates a synchronous Content Provider response that activates the entitlement.
CREATE_REQUEST_RETURNS_CREATEDSimulates creation without activation. The entitlement remains pending activation.
CREATE_REQUEST_RETURNS_ACTIVATION_REQUIREDSimulates an asynchronous activation flow and returns mock activation information.

Activation information

Suspend

Terminate, cancel, or revoke

Update

Error responses

Header valueSimulated response
ANY_REQUEST_RETURNS_BAD_REQUEST400 Bad Request
ANY_REQUEST_RETURNS_UNAUTHORIZED401 Unauthorized
ANY_REQUEST_RETURNS_CONFLICT409 Conflict
ANY_REQUEST_RETURNS_INTERNAL_SERVER_ERROR500 Internal Server Error
ANY_REQUEST_RETURNS_SERVICE_UNAVAILABLE503 Service Unavailable

Mock response headers or Bango Music?

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.