Overview
The issue of redeem codes not being sent via the Greggs API was due to a missing price value in the API request body. This problem typically occurs when the price parameter is not correctly set, leading to failed API requests. The issue was resolved by updating the price value, allowing the API to function correctly.
Information
Issue: Greggs API not sending redeem codes after contract renewal
Error Message: No specific error message was provided, but the API request was failing due to a missing price value.
Cause: The API request body was missing a price value, which is required for successful processing of redeem codes.
Resolution Steps:
-
Identify the Failing API Request:
- Check the API request logs for any failed requests.
- Locate the request to "https://www.simfoni.co.uk/api/order" that is failing.
-
Examine the Request Body:
- Review the request body for missing or null values.
- Specifically, check the "price" field in the request body.
-
Update the Price Value:
- Ensure that the "price" field in the request body is populated with the correct value.
- Example request body:
{ "urn": "<urn_value>", "reference": "<reference_id>", "items": [ { "sku": "<sku_value>", "quantity": 1, "price": "<correct_price_value>", "delivery_date": "<delivery_date>", "activation_date": "<activation_date>", "delivery_method_id": 1 } ] }
-
Test the API Request:
- Resend the API request with the updated price value.
- Verify that the request is processed successfully and redeem codes are sent.
-
Verify Resolution:
- Confirm that redeem codes are being sent and received as expected.
- Check for any further errors or issues in the API logs.
Note: Ensure that all required fields in the API request body are correctly populated to prevent similar issues in the future.
Frequently Asked Questions
- How do I know if the Greggs API issue applies to my situation?
- If you are experiencing issues with redeem codes not being sent and have recently renewed your contract, check the API request body for missing or null values, particularly the price field.
- What should I do if the API request is still failing after updating the price value?
- Verify that all required fields in the API request body are correctly populated. If the issue persists, contact support with detailed logs and request information for further assistance.
- Are there any other common issues with the Greggs API?
- Common issues include incorrect authorization tokens, mismatched domain URLs, and missing required fields in the API request body. Ensure all configurations are correct to avoid these issues.
Priyanka Bhotika
Comments