Retrieving a new eta from an existing order

Hi!

Small question about the ETA endpoint.

I have created a job with a given job.dropoffs.client_reference, a job.pickup_at in somewhere in the future and pickup and dropoff addresses. Now, let’s say that I would like to get an ETA for the same order but at a different time.

The problem:
When requesting the ETA and if the payload includes the key “job.dropoffs.client_reference”, then the response is:

{
  "error": "JOB_INVALID_DUPLICATED_ORDER_ID",
  "message": "Provided order ID is already used",
  "data": {
    "job.dropoffs.client_reference": [
      "must be unique",
      "size cannot be greater than 191"
    ]
  }
}

However, if I just remove the dropoffs.client_reference key, then it returns the ETA.

The question:
Is there a reason why requesting for an ETA checks for the uniqueness of the dropoffs.client_reference ?

Thanks!
Jaime

Hi!
Whilst the body of the response for the ETA endpoint is the same as the create a job endpoint, The ETA would only need the required fields as specified in the documentation, such as the pickup address and dropoff address.
In order to get the ETA when using the ETA endpoint, I suggest removing the client reference.

The client reference ordinarily exists when creating a job to ensure the job is unique and duplicates are not created.

I hope this helps!

1 Like