Verbose Mode

During the integration stage, it is often useful for the integrator to retrieve meta-data about the find calls, as well as the response data.

Currently, there are 2 verbose modes that can be enabled via a request [query string] parameter.

The response data is available as a top level response property (info), at the same level as header and results.

Geocoding

In find calls that include pickup points (PUDOS / own stores), if the user provides an address, we then need to geocode the provided address.

Geocoding is an extremely complex problem to solve and it is not always possible to retrieve accurate coordinates. The lowest common denominator is a set of reference coordinates for the provided country. The geocoding verbose mode makes the information on the accuracy level of the coordinates used to retrieve pickup points transparent to the caller.

The possibilities are: ADDRESS and COUNTRY.

Request

GET ...&verbose=GEOCODING

Response

HTTP/1.1 200 OK
{
  "header": { /* ... */ },
  "results": [ /* ... */ ],
  "info": {
    "geocoding": {
      "accuracy": "COUNTRY"
    }
  }
}

Allocation

Again, in find calls that include pickup points (PUDOS / own stores), DDO needs to perform multiple simultaneous calls to a backend system to determine the full list of delivery options, corresponding to the number of relevant pick up points and the home delivery itself, if relevant, depending on the provided optionType value(s).

There are a few things that can happen to each of these concurrent calls:

  • Success (manage to populate options for a specific address);
  • Failure
    • Address not covered by the services configured in the backend system (ex.: routing, missing parameters, failed validation, etc...)
    • Network failure (timeout, network partition, routing issues, etc...)
    • Backend system unavailable

If all of the requests succeed, the response is considered COMPLETE, if none of them do, we identify the status as EMPTY. The other status is PARTIAL, when at least one of the requests succeed in generating options.

Request

GET ...&verbose=ALLOCATION

Response

HTTP/1.1 200 OK
{
  "header": { /* ... */ },
  "results": [ /* ... */ ],
  "info": {
    "allocation": {
      "status": "PARTIAL"
    }
  }
}

results matching ""

    No results matching ""