The API docs already document the “duplicate datapoint” error response, but not “Duplicate request.” Are these messages the same thing, or different? Either way, could the API docs be updated for clarity?
[
requestid] (string): String to uniquely identify this datapoint (scoped to this goal. The samerequestidcan be used for different goals without being considered a duplicate). Clients can use this to verify that Beeminder received a datapoint (important for clients with spotty connectivity). Using requestids also means clients can safely resend datapoints without accidentally creating duplicates. Ifrequestidis included and the datapoint is identical to the existing datapoint with that requestid then the datapoint will be ignored (the API will return “duplicate datapoint”). Ifrequestidis included and the datapoint differs from the existing one with the same requestid then the datapoint will be updated. If no datapoint with the requestid exists then the datapoint is simply created. In other words, this is an upsert endpoint and requestid is an idempotency key.
(Didn’t know whether to put this in Tech or Bugabee.)