Skip to main content

Documentation Index

Fetch the complete documentation index at: https://api.docs.onlydrams.app/llms.txt

Use this file to discover all available pages before exploring further.

Submits corrections for a specific juice. This endpoint allows users to propose changes to various fields of a juice, including its name, proof, and image.

Parameters

juice_id
string
required
The ID of the juice for which corrections are being submitted.
corrections.bottle_id
integer
required
The ID of the bottle associated with the corrections.
corrections.items
array
required
An array of correction items, each containing the field to be corrected, its current value, and the suggested new value.
corrections.items[].field
string
required
The name of the field being corrected (e.g., “name”, “proof”, “image”).
corrections.items[].current
string
required
The current value of the field.
corrections.items[].suggested
string
The suggested new value for the field. Can be null for image corrections.

Returns

Returns a success message indicating the number of corrections submitted successfully, or an error message if the submission fails.
curl -X POST \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json" \
  -d '{
    "corrections": {
      "bottle_id": 123,
      "items": [
        { "field": "name", "current": "Old Name", "suggested": "New Name" },
        { "field": "proof", "current": "40", "suggested": "45" },
        { "field": "image", "current": "old_image_url", "suggested": null }
      ]
    }
  }' \
  https://api.onlydrams.app/api/v1/juices/1/corrections
{
  "message": "3 corrections submitted successfully."
}

Error Responses

If the submission fails due to invalid parameters or other issues, you may receive an error response:
{
  "message": "Failed to submit corrections: Invalid field name 'invalid_field'"
}

Notes

  1. The API supports submitting multiple corrections in a single request.
  2. For image corrections, the suggested field can be null.
  3. Invalid field names or values will result in an error response.
  4. The API will return a singular or plural success message based on the number of corrections submitted.
  5. Ensure you have the necessary authentication token in the request header.