Callback support for Order updates
Date: August 25, 2024 We've introduced an optional callback attribute for order updates in PUT APIs to allow developers to receive the order status asynchronously.
This mechanism minimizes the need for repetitive polling by the client to verify update success. It reduces the server load and ensures real-time feedback
- Allows developers to receive confirmation of successful updates without manual checks.
- Enhances the reliability of update operations by notifying through a specified URL.
The basic process involves adding a callback attribute to your API requests, which contains the URL or endpoint where notifications can be sent once a defined event occurs.
Include the callback attribute in the request body when making a PUT request.
- Ensure the provided callback URL is accessible and properly configured to handle incoming requests.
- The endpoint should return a success status code (e.g., 200 OK) upon receiving a notification.
An order is updated in the logistics order service. The system sends a POST request to the specified callback URL in the attribute. The response is processed to confirm successful notification delivery.
- Tokens used in API requests expire after a defined time period (e.g., 30 minutes).
- Ensure to refresh tokens and update your requests accordingly to avoid authentication issues.
The following APIs have been updated to include the new callback attribute:
For detailed information on how to use this new attribute, refer to our updated How to Guide for Order Update.